Skip to main content

I have a shape-file of polygons representing land cover (cropland, forest, water etc.). For each cropland polygon I would like to know the furthest distance from any point within each cropland polygon the nearest edge of another polygon that is not cropland or water (see the paint illustration below 😃 ). Any ideas?

 

polygon_point

I am trying to understand the situation, so bare with me. You have polygons and point geometry; Points are located within polygon: one wants to compute distance between point and the edge (corner) of neighboring polygon, where polygon =! cropland or water? Are you able to send some sample data to play with?@johan13karlsson​ 


I imagined some scenarios and came up with this Workspace PointToPolygon.fmwt

Basicaly you use a NeighborFinder to get closest points on Polygons that you filter to be NOT Cropland or Water, in my case Other, Create vertex with closest_candidate_x, closest_candidate_y and build lines from original point to closest point on Other (non Cropland or Water) Polygons.

PointToPolygonAdvanced: test if line Crosses Cropland or Water polygons, filter those that do and replace with a pair of original point + point on second closest non C/W polygon, build new lines, test them again and again and again 😁 PointToPolygonNoCrossing


Reply