[postgis-users] polygons crossing 0/360 longitude

Brent Wood pcreso at pcreso.com
Wed Jun 21 02:46:57 PDT 2006


There is no easy way in PostGIS to do this that I'm aware of. 

I've looked at scripts to do this

The approach I've taken that works fine in my situation, where the polygons are
background layers (with longitudes from -180 to 180) for mapserver & QGIS, is
to select all the polygons which intersect a -180/0/-90/90 polygon, translate
them 360 degrees, then add them to the original table.

This gives me a table which has a longitudinal extent of over -180 to 360
(depending on the extent of the intersecting polygons), with the W hemisphere
stored twice. Some data redundancy but a seamless coverage.

On a Linux system, I have used symbolic links to a raster tile set, to achieve
a similar -180-360 coverage. I have world files which apply to the links, so in
this case I have not needed to replicate the imagery for the W hemisphere, as
the links do this for me.

I don't know if this approach is any use to others, but it works for me
(sitting in New Zealand where +-180 is a major inconvenience).


Cheers,

  Brent Wood




More information about the postgis-users mailing list