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?



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 😁 