Thursday 4 August 2016

arcgis desktop - Travel planning - Finding farthest points of a polygon


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:



  1. Pick 2 most remote points on the lake in terms of travelling distance

  2. Define ‘left’ and ‘right’ shores of the lake

  3. Travel at equal distance between shores from A to B



enter image description here


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.


enter image description here


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.


enter image description here


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:




  1. Create Centerlines




  2. 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:



  1. Feature To Point GP tool

  2. DISTANCE BETWEEN POINTS TOOL (from Hawth's Analysis Tool)


Similiar Questions


How to compute Straight Skeletons using Python?


Simplifying polygons to linestring



Find tunnel 'center line'?


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...