[postgis-users] distance_sphere() with polygons

Paul Ramsey pramsey at refractions.net
Sat Jan 14 11:30:14 PST 2006


No trick, it's only implemented for points.  We're waiting for  
someone mathematically talented to come along and solve the general  
case, which involves projected distances on the surface of a spher(oid).

On Jan 13, 2006, at 7:48 AM, Daniel Ricard wrote:

> Hello all,
> 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.
>
> The documentation say that distance_sphere() and others only work  
> for points
> but there must be a way to do this. Help greatly appreciated.
> Cheers,
>
> Dan
> _______________________________________________
> 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