<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic maximum distance from a point within a polygon in Spatial Data Science Questions</title>
    <link>https://community.esri.com/t5/spatial-data-science-questions/maximum-distance-from-a-point-within-a-polygon/m-p/143720#M357</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm looking for a way to determine the maximum straightline distance from a point within the interior of an irregular polygon to the polygon's edge (any point along the edge) without every leaving the polygon's interior.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone is out there that can help me with this, I'd greatly appreciate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;William&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 02 Apr 2016 23:08:28 GMT</pubDate>
    <dc:creator>WilliamEllis1</dc:creator>
    <dc:date>2016-04-02T23:08:28Z</dc:date>
    <item>
      <title>maximum distance from a point within a polygon</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/maximum-distance-from-a-point-within-a-polygon/m-p/143720#M357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm looking for a way to determine the maximum straightline distance from a point within the interior of an irregular polygon to the polygon's edge (any point along the edge) without every leaving the polygon's interior.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone is out there that can help me with this, I'd greatly appreciate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;William&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Apr 2016 23:08:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/maximum-distance-from-a-point-within-a-polygon/m-p/143720#M357</guid>
      <dc:creator>WilliamEllis1</dc:creator>
      <dc:date>2016-04-02T23:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: maximum distance from a point within a polygon</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/maximum-distance-from-a-point-within-a-polygon/m-p/143721#M358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is sometimes called 'polygon fetch'&amp;nbsp; and in some situations, the polygon diameter.&amp;nbsp; Thisis different that the medial axis (can have deviations in the line angle etc) or straight skeleton.&amp;nbsp; Perhaps GME' calculate fetch in polygon will work &lt;A href="http://www.spatialecology.com/gme/geompolygonfetch.htm" title="http://www.spatialecology.com/gme/geompolygonfetch.htm"&gt;GME | SpatialEcology.Com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Apr 2016 23:31:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/maximum-distance-from-a-point-within-a-polygon/m-p/143721#M358</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-04-02T23:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: maximum distance from a point within a polygon</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/maximum-distance-from-a-point-within-a-polygon/m-p/143722#M359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'll give it a try.&amp;nbsp; Thank you, Dan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Apr 2016 00:16:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/maximum-distance-from-a-point-within-a-polygon/m-p/143722#M359</guid>
      <dc:creator>WilliamEllis1</dc:creator>
      <dc:date>2016-04-03T00:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: maximum distance from a point within a polygon</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/maximum-distance-from-a-point-within-a-polygon/m-p/143723#M360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For a bit more context, or at least to read an interesting discussion, you should check out a StackExchange thread started by &lt;A href="https://community.esri.com/migrated-users/3116"&gt;Dan Patterson&lt;/A&gt; a couple years back:&amp;nbsp; &lt;A href="http://gis.stackexchange.com/questions/69025/antipodal-distance-or-polygon-fetch-or-polygon-diameter-for-concave-polygons"&gt;Antipodal distance (or polygon fetch or polygon diameter) for concave polygons&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unlike calculating the minimum distance or minimum straightline distance, calculating the maximum straightline distance from a point within a polygon to the polygon's boundary is more involved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at a simple concave polygon and point example:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="polygon_point_example.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/194188_polygon_point_example.png" style="height: auto; padding-left: 60px;" /&gt;&lt;/P&gt;&lt;P&gt;Polygon diameter has a common definition in mathematics (&lt;A href="http://mathworld.wolfram.com/"&gt;Wolfram MathWorld Glossary&lt;/A&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-size: 130%; padding: 0px 0px 3px; text-align: left; color: #00a6a6; text-indent: 0px; border-bottom-color: #a9e163; border-bottom-width: 1px; border-bottom-style: solid;"&gt;Polygon Diameter&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The diameter of a polygon is the largest distance between any pair of &lt;A href="http://mathworld.wolfram.com/PolygonVertex.html" style="color: #006699;"&gt;vertices&lt;/A&gt;. In other words, it is the length of the longest &lt;A href="http://mathworld.wolfram.com/PolygonDiagonal.html" style="color: #006699;"&gt;polygon diagonal&lt;/A&gt; (e.g., straight line segment joining two vertices).&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;For the example above, the polygon diameter can be represented by either of two pairs of vertices:&amp;nbsp; &lt;SPAN style="font-family: courier new,courier;"&gt;(POINT(0 0), POINT(400 200))&lt;/SPAN&gt; or &lt;SPAN style="font-family: courier new,courier;"&gt;(POINT(400 0), POINT(0 200)&lt;/SPAN&gt;.&amp;nbsp; Note that the definition of polygon diameter doesn't speak to convexity or concavity.&amp;nbsp; For concave polygons, it is not uncommon to have the polygon diameter cross over the polygon boundary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fetch or fetch length has its origins in the earth sciences, i.e., geography, hydrology, meteorology, etc....&amp;nbsp; (&lt;A href="http://forecast.weather.gov/glossary.php"&gt;National Weather Service Glossary&lt;/A&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Fetch&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;...&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;2. In hydrologic terms, &lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI&gt;The effective distance which waves have traversed in open water, from their point of origin to the point where they break.&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The concept of fetch is fairly straightforward, but computing fetch length isn't as straightforward as polygon diameter.&amp;nbsp; At its most basic, fetch length depends on the shape of the water body surface (polygon) and the direction of wind.&amp;nbsp; In reality other factors like landscape topography and water body bathymetry play into where exactly a wave starts.&amp;nbsp; Typically what is called fetch length is really a potential or idealized fetch length based only on the surface shape of a water body and a given wind direction.&amp;nbsp; Furthermore, since fetch is wind dependent, there is no single fetch length for a water body.&amp;nbsp; Some people use the term fetch length in a singular sense, but what they are typically referring to is the maximum value of all fetch lengths for a water body.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In terms of mathematics or computational geometry, I am not sure what the equivalent term is for maximum potential fetch length of a water body.&amp;nbsp; There aren't a lot of tools that compute fetch length.&amp;nbsp; As &lt;A href="https://community.esri.com/migrated-users/3116"&gt;Dan Patterson&lt;/A&gt; pointed out in an earlier comment, the GME &lt;A href="http://www.spatialecology.com/gme/geompolygonfetch.htm"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;geom.polygonfetch&lt;/SPAN&gt; &lt;/A&gt;tool is commonly used by folks.&amp;nbsp; As the tool's documentation states, it uses a brute force algorithm "evaluating the lines created by connecting all pairs of non-neighboring vertices and retaining the longest line that does not cross any interior or exterior boundaries of the polygons."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is important to note that &lt;SPAN style="font-family: courier new,courier;"&gt;geom.polygonfetch&lt;/SPAN&gt; doesn't do densification before computing maximum fetch, or what it just calls polygon fetch.&amp;nbsp; For the example above,&lt;SPAN style="font-family: courier new,courier;"&gt; geom.polygonfetch&lt;/SPAN&gt; will return a line represented by the &lt;SPAN style="font-family: courier new,courier;"&gt;(POINT(0 0), POINT(400 0))&lt;/SPAN&gt; pair of vertices, but there is a longer maximum fetch represented by &lt;SPAN style="font-family: courier new,courier;"&gt;(POINT(0 133), POINT(400 0))&lt;/SPAN&gt;.&amp;nbsp; The problem is there isn't a vertex at &lt;SPAN style="font-family: courier new,courier;"&gt;POINT(0 133)&lt;/SPAN&gt;, so the tool doesn't know there is a longer straightline distance within the polygon that doesn't cross a boundary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All of that said, polygon diameter and maximum potential fetch length aren't what you are after here.&amp;nbsp; Both are properties of a given polygon, not a spatial relationship between a polygon and another geometry.&amp;nbsp; For points in polygons, a Hausdorff distance line will give the longest straightline from a point to the boundary of a polygon.&amp;nbsp; The Hausdorff distance doesn't speak to convexity or concavity, so it is more similar to polygon diameter than maximum potential fetch length.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="polygon_point_example_hausdorff.png" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/194197_polygon_point_example_hausdorff.png" style="height: auto; padding-left: 60px;" /&gt;&lt;/P&gt;&lt;P&gt;Even if your polygons were convex or crossing polygon boundaries wasn't an issue, very few geospatial products have implemented Hausdorff algorithms.&amp;nbsp; In short, you are going to be rolling your own solution.&amp;nbsp;&amp;nbsp; Googling for "maximum distance point in polygon" yields some links to good discussions.&amp;nbsp; Most of what is discussed involves brute force approaches like the &lt;SPAN style="font-family: courier new,courier;"&gt;geom.polygonfetch&lt;/SPAN&gt; tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am an engineer by training, and by mindset, so sometimes I ask myself what answer can I live with rather than what the perfect or correct answer is in theory.&amp;nbsp; One approach you could try, knowing it may miss the true answer:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Determine polygon diameter&lt;/LI&gt;&lt;LI&gt;Create lines every x degrees originating from point and of length polygon diameter.&lt;/LI&gt;&lt;LI&gt;Intersect lines on polygon&lt;/LI&gt;&lt;LI&gt;Return maximum of first line segment from lines.&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2016 18:12:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/maximum-distance-from-a-point-within-a-polygon/m-p/143723#M360</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2016-04-07T18:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: maximum distance from a point within a polygon</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/maximum-distance-from-a-point-within-a-polygon/m-p/143724#M361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nice summary Joshua.&amp;nbsp; Other areas of application would include robotics and anything doing with line of sight (think of your home alarm system).&amp;nbsp; The skeleton is more common in robotics (make something move within a room without scrapping a wall.&amp;nbsp; A cautionary note about 'fetch' is that it generally pays no attention to the Z axis.&amp;nbsp; Wind blowing across a sandbar really isn't going to be affected by it to any comparative degree.&amp;nbsp; One can bring in visibility analysis into this as a surrogate.&amp;nbsp; Assume a flat surface (zero elevation) extrude some walls (like a mountain), run the visibility analysis with any desired OFFSETA and OFFSETB and the visibility will give you sight lines.&amp;nbsp; From there you can use thinning algorithms to thin the areas down to something that can be used to generate lines.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Apr 2016 19:31:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/maximum-distance-from-a-point-within-a-polygon/m-p/143724#M361</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-04-07T19:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: maximum distance from a point within a polygon</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/maximum-distance-from-a-point-within-a-polygon/m-p/143725#M362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to know if there is an ArcGIS tool to calculate the maximum distance from the centroid of a polygon to the polygon edge.&amp;nbsp; Specifically I'm working with a parcel dataset.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2020 12:52:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/maximum-distance-from-a-point-within-a-polygon/m-p/143725#M362</guid>
      <dc:creator>JoeStefanoni</dc:creator>
      <dc:date>2020-04-24T12:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: maximum distance from a point within a polygon</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/maximum-distance-from-a-point-within-a-polygon/m-p/143726#M363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dan might know of recent developments, but I don't think anything has changed on this issue in the past 4 years, i.e., there is still no ArcGIS geoprocessing tool that calculates what you are seeking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE:&amp;nbsp; One thing that has changed is that SciPy now includes &lt;A class="link-titled" href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.distance.directed_hausdorff.html#scipy.spatial.distance.directed_hausdorff" title="https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.distance.directed_hausdorff.html#scipy.spatial.distance.directed_hausdorff"&gt;scipy.spatial.distance.directed_hausdorff — SciPy v1.4.1 Reference Guide&lt;/A&gt; .&amp;nbsp; You can use &lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/data-access/featureclasstonumpyarray.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/data-access/featureclasstonumpyarray.htm"&gt;FeatureClassToNumPyArray—Data Access module | Documentation&lt;/A&gt; to dump vertices to NumPy arrays and then use SciPy to calculate the Hausdorff distance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Apr 2020 16:41:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/maximum-distance-from-a-point-within-a-polygon/m-p/143726#M363</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-04-24T16:41:33Z</dc:date>
    </item>
  </channel>
</rss>

