If the point is inside the polygon, the distance between them is 0. Can't get closer than that!

You may want to try ST_ClosestPoint(ST_Boundary(poly), point)

On 10/5/2012 12:10 PM, Dave Potts wrote:
just tried a

select st_closestpoint(poly,point) and got the result point

The point is within a the closed polygon poly, the version is postgis 2.0
is there any sane reason why this behave in this manner.  I had expected
to the value of the x/y coordinate pair from the polylgon that is nearest
to point, not the value of point!

Any suggestions as what I might be doing wrong?  or an suggestions for a
better way of doing this?

regards


Dave.


_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to