[postgis-users] Spheroid Question

Markus Schaber schabi at logix-tt.com
Mon Jun 27 03:33:45 PDT 2005


Hi, Stephen,

Stephen Woodbridge wrote:

> the_geom && expand(setSRID(makepoint(-72.607912,
> 42.058052),4326),0.179664)  AND

This works fine in aequatorial regions. The more you go to the north,
the more degrees per meter you get in east-west direction. So you have
to either expand your bbox in east-west direction by an angle-dependend
factor (you could use some sine/cosine magic and the scale() function of
PostGIS CVS for it), or you use some intermediate metrical projection
for defining your bbox.

If you do not expand the bbox horizontally, the && operator will trop to
much of your geometries, leading to incorrect results.

Hth,
Markus




More information about the postgis-users mailing list