PostGIS: Closest outside point to point inside polygon

المشرف العام

Administrator
طاقم الإدارة
There is the famous ST_ClosestPoint() return the closest point inside polygon to some outside point.

I'm looking the inverse problem: I have a location inside polygon, and I want to get the closest location outside the polygon.

I started thinking that first step should be to find the closest point on the boundary of the polygon. Although I don't know how to achieve this, I'm not sure how to continue even from this stage (considering I have the closest boundary point to my inside point).

EDIT:What about comparing results from ST_Line_Locate_Point() running on all lines of the polygon and choosing the minimum?

Thanks,



أكثر...
 
أعلى