[postgis-users] distance_sphere() with polygons
Michael Fuhr
mike at fuhr.org
Sat Jan 14 10:28:37 PST 2006
On Fri, Jan 13, 2006 at 11:48:59AM -0400, Daniel Ricard wrote:
> Is there a trick to using distance_sphere() or distance_spheroid() when one
> wants the distance between a point and the boundary of a polygon?
>
> I've been using:
>
> SELECT distance(i.the_geom, boundary(j.the_geom))
>
> and would now like to obtain distance in meters instead of degrees.
How close are the geometries to each other and how accurate does
the result need to be? Would transforming the geometries to an
SRID that uses meter units (e.g., a UTM zone) work? That probably
wouldn't be a good solution if the geometries are far apart, but
it might be good enough if they're close to each other.
--
Michael Fuhr
More information about the postgis-users
mailing list