[postgis-users] spheroid bounding box calculation

Jeff Davis pgsql at j-davis.com
Thu Jul 23 08:49:04 PDT 2009


On Thu, 2009-07-23 at 07:06 -0400, Stephen Frost wrote:
> Why do you care about it being in meters..?

Well, all I care about is that it's in some kind of linear length units.
Queries might take the form of "what else is within 3 miles of this
lat/lon point?". 

> Just make sure that
> st_expand will grow it large enough to be within the distance limit
> you're looking for everywhere, and then convert to UTM for the actual
> source point and use distance() there to further refine the search.
> 
> Use the bounding box to narrow the search, don't try to use it *as* your
> search criteria.
> 

That's what I'm trying to do. But how do I ensure that the bounding box
is big enough to account for points near the poles, but not too big for
points near the equator?

I suppose it's not really necessary for it to be accurate near the
poles, but I'm curious why there's not a function that works everywhere.

Regards,
	Jeff Davis




More information about the postgis-users mailing list