[postgis-users] RE:Is the Earth round??

Carlos Ferrão cferrao at gmail.com
Wed May 24 07:20:50 PDT 2006


Hi,
Thanks for the prompt answers on this list.
The main purpose is to have a database with metadata of satellite
image products and search for them given date and coordinate
constraints. I already did it using Oracle Spatial Module but was
looking for a low cost solution (btw, this issue doesn't happen there)
with Postgres+PostGIS (GEOS & Proj4).

The products follow WGS84 (+/-180) lon/lat and I have images from
around the world, so I cannot simply move the meridian to another
place.

I added my polygon using 0-360 (Brent's suggestion) and I got a valid
one. Unfortunately, this product is only retrieved if my bounding box
is near the 180 limit of my map interface and ignores the -177 value.

In order to workaround all this, I'm considering (assuming that no
satellite takes an image bigger than half of the globe) doubling the
products that cross the dateline, and process the coordinates to put
one in the -180/180 and another in 180/360. Then I'd do a select
distinct (just in case I have a very large BBox) to retrieve always
one product.

Second option is to split the coordinates into two polygons and define
a multipolygon for each product.
Any of these ideas imply further processing of satellite metadata so
if there is a better method to do this I appreciate any input.

Thanks,
Carlos.



More information about the postgis-users mailing list