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.
Advanced: 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 😁