[postgis-users] Geometry over the poles - shift in Cartesian origin

Alan Beccati beccati at meeo.it
Tue May 19 04:49:03 PDT 2009


Hi,
I've just read some of the mails in the archives related to geometries
over the poles and I came to understand that the spatial engine always
assumes Cartesian coordinates with origin on the intersection between
the central meridian and the Equator (lat 0, lon 0).

Considering the three projections based on WGS84 spheroid EPSG:32661,
EPSG:32761 and EPSG:4326; to properly handle the poles, a shift in the
Cartesian origin would be needed, and in fact it should be performed for
geometries belonging to EPSG:32661 and 32761 (UPS).

For these systems, the Cartesian origin is repectively:
Latitude of the origin: 0°. Longitude of the origin (central meridian):
0° for 4326,
Latitude of the origin: 90°. Longitude of the origin (central meridian):
0° for 32661 (North pole) and
Latitude of the origin: -90°. Longitude of the origin (central
meridian): 0° for 32761 (South Pole).

With that kind of Cartesian system switch, the following geometry should
be valid (a square) in 32761
SELECT isValid(GeometryFromText('POLYGON((0 -85,90 -85,180 -85,-90 -85,0
-85))',32761));
NOTICE:  Self-intersection at or near point -90 -85
 isvalid
---------
 f

While the given error should occur only for EPGS:4326 or any other
similar system where that geometry maps to a Cartesian line.

Best regards,
Alan





More information about the postgis-users mailing list