[postgis-users] Spheroid Question
Stephen Woodbridge
woodbri at swoodbridge.com
Mon Jun 27 04:42:46 PDT 2005
Markus Schaber wrote:
> 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
Hi Markus,
You are correct that degrees per meter increases, but we are concerned
with meters per degree in this example and being the inverse they
decrease. So by using the value at the equator, we over sample as we
move toward the poles which is ok, unless it creates a performance
problem in which case you will have to expand the bbox x and y as you
suggest.
-Steve
More information about the postgis-users
mailing list