Re: [postgis-users] st_closespoint weridness

2012-10-06 Thread Sandro Santilli
On Fri, Oct 05, 2012 at 11:07:47PM +0100, Dave Potts wrote: > > Martin Davis wrote: > > If the point is inside the polygon, the distance between them is 0. > Hmm I do not understand, then nearest point should be along the boundary > of the polygon. That's the nearest point on the boundary you're

Re: [postgis-users] st_closespoint weridness

2012-10-05 Thread Dave Potts
Martin Davis wrote: > If the point is inside the polygon, the distance between them is 0. Hmm I do not understand, then nearest point should be along the boundary of the polygon. > Can't get closer than that! > > You may want to try ST_ClosestPoint(ST_Boundary(poly), point) This worked, many th

Re: [postgis-users] st_closespoint weridness

2012-10-05 Thread Martin Davis
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

Re: [postgis-users] st_closespoint weridness

2012-10-05 Thread Nicklas Avén
I am not sure I understand what you get and what you expect. Is your input point inside the polygon? Regards Nicklas On Fri, 2012-10-05 at 20:10 +0100, Dave Potts wrote: > just tried a > > select st_closestpoint(poly,point) and got the result point > > The point is within a the closed polygo

[postgis-users] st_closespoint weridness

2012-10-05 Thread Dave Potts
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 t

[postgis-users] st_closespoint weridness

2012-10-05 Thread Dave Potts
Just tried a select st_closestpoint(poly,point) -- ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users