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

Paul Ramsey pramsey at refractions.net
Wed May 24 13:24:36 PDT 2006


A multipolygon will not work, since its overall bounding box will  
still straddle the meridian.  The cleanest way to implement a  
dateline hack is probably a pre-commit trigger that tests inputs for  
dateline crossing, and re-writes them into two inserts instead of  
one, as you suggest.

P

On May 24, 2006, at 7:20 AM, Carlos Ferrão wrote:

> 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.
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users




More information about the postgis-users mailing list