I’d like to organize a tour around the lake with 2 objectives:
- maximise the length of shores to view
- minimise travel distance
In order to do so I can:
- Pick 2 most remote points on the lake in terms of travelling distance
- Define ‘left’ and ‘right’ shores of the lake
- Travel at equal distance between shores from A to B
What is the best way to find these 2 points?
UPDATE ON ORIGINAL Q:
The approach I am using is to place multiple random points and calculate Euclidean minimum spanning tree.
Iterate trough all pairs of points/nodes in order to find a couple with longest distance. Picture shows distance where destination is point at the North. It works but a bit cumbersome, so I am looking for ideas. Raster or vector will do.
This is about never ending discussion re polygon length.
Answer
Non-Convex Polygon
You should draw the Medial Axis Transform (skeleton or center-line) of the polygon. Options to do this:
use CGAL with arcobjects
Then utilize the centerlines calculate network based distanced between any two points and find the farthest ones.
Convex Polygon
The simplest, albeit not the most efficient way is to calculate (arcpy) pair-wise distances between each vertices of your polygon feature (Lake) and extract the greatest one. The complexity would be o(n^2), with n the number of vertices, for each polygon.
If you don't want to do coding (python), create a model with:
- Feature To Point GP tool
- DISTANCE BETWEEN POINTS TOOL (from Hawth's Analysis Tool)
Similiar Questions
How to compute Straight Skeletons using Python?
Simplifying polygons to linestring
No comments:
Post a Comment