| Hi Puneet, We ran into this issue as well. As a workaround for display in QGIS, we store those features that cross the date line as MULTIPOLYGONS that are split at 180/-180 line. It is not ideal, but it works for display. It does not work for some operations like ST_Centroid but others like ST_Contains will work. Jesse Examples: As displayed in QGIS: . . . ![]() From the database perspective: smddb_dev=# SELECT AsText(scene_geom) FROM scene_locator WHERE id = 28716; astext ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- MULTIPOLYGON(((179.665 -17.733,180 -17.6550440252,180 -18.2032131661,179.794 -18.251,179.665 -17.733)),((-180 -17.6550440252,-179.699 -17.585,-179.568 -18.103,-180 -18.2032131661,-180 -17.6550440252))) (1 row) smddb_dev=# SELECT AsText(ST_Centroid(scene_geom)) FROM scene_locator WHERE id = 28716; astext -------------------------------------------- POINT(-27.1147737791952 -17.9181176096631) (1 row) smddb_dev=# SELECT ST_Contains(scene_geom, GeomFromText('POINT(-179.8 -17.8)', 4326)) FROM scene_locator WHERE id = 28716; st_contains ------------- t (1 row) On Sep 15, 2011, at 4:06 PM, Paul Ramsey wrote:
|
_______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
. . . 
