[OSM-dev] Additions to Osmosis
Robert (Jamie) Munro
rjmunro at arjam.net
Tue Nov 6 00:17:40 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Karl Newman wrote:
> 2. Add support for area filters which cross the 180th meridian
> (Opposite of prime meridian; is that the subprime meridian?) Bounding
> box is easy--just see if left > right, create 2 boxes which join at
> +/- 180 degrees, and test both for node inclusion. Polygon is
> substantially more complex--could be any number of sub-polygons which
> join at +/- 180, depending how complex and "snaky" the polygon is
> (i.e., how many times it crosses the 180th). One implicit assumption
> here is that OSM coordinates will be in unprojected decimal degrees
> (presumably WGS84). I don't know if that's a problem, but it does
> impose a restriction that wasn't (strictly) present before.
At the binary level, if you represent longitude as a signed integer with
- -180 at the minimum value for an int and 179.99 as the maximum value for
an int, you can easily do calculations crossing the meridian by just
treating the number as unsigned. 32 bits gives you a resolution of 0.93
cm at the equator, and better as you move towards the poles.
I'm not sure if you use this easily in Java, though, because I don't
think Java will let you work at the binary level in this way.
Robert (Jamie) Munro
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHL7Kiz+aYVHdncI0RAhzDAJ9ZMGry0/zK89WMqdoB9R7FK6t30wCfca9U
lVX/bzRtNzT1J/xVB1M2lY0=
=Y0Fq
-----END PGP SIGNATURE-----
More information about the dev
mailing list