<?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 Compute the longest radius in a polygon in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/compute-the-longest-radius-in-a-polygon/m-p/1136116#M50375</link>
    <description>&lt;P&gt;Hello. I'm using ArcGIS Pro 2.9.0. I have more than 6,000 census block groups (polygons in ArcGIS Pro) and I would like to compute the longest radius in each of them. I attached a picture to illustrate what the longest radius is. I would really appreciate it if you could let me know how I could accomplish it. Thank you.&lt;/P&gt;</description>
    <pubDate>Sat, 22 Jan 2022 02:52:47 GMT</pubDate>
    <dc:creator>zhongying_gan</dc:creator>
    <dc:date>2022-01-22T02:52:47Z</dc:date>
    <item>
      <title>Compute the longest radius in a polygon</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/compute-the-longest-radius-in-a-polygon/m-p/1136116#M50375</link>
      <description>&lt;P&gt;Hello. I'm using ArcGIS Pro 2.9.0. I have more than 6,000 census block groups (polygons in ArcGIS Pro) and I would like to compute the longest radius in each of them. I attached a picture to illustrate what the longest radius is. I would really appreciate it if you could let me know how I could accomplish it. Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jan 2022 02:52:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/compute-the-longest-radius-in-a-polygon/m-p/1136116#M50375</guid>
      <dc:creator>zhongying_gan</dc:creator>
      <dc:date>2022-01-22T02:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: Compute the longest radius in a polygon</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/compute-the-longest-radius-in-a-polygon/m-p/1136118#M50376</link>
      <description>&lt;P&gt;Take a look of Minimum Bounding Geometry tool.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/minimum-bounding-geometry.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/minimum-bounding-geometry.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jan 2022 03:04:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/compute-the-longest-radius-in-a-polygon/m-p/1136118#M50376</guid>
      <dc:creator>DanLee</dc:creator>
      <dc:date>2022-01-22T03:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: Compute the longest radius in a polygon</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/compute-the-longest-radius-in-a-polygon/m-p/1136124#M50377</link>
      <description>&lt;P&gt;I agree with Dan but... If your requirement is to have the line not cross any boundaries, it will not produce the expected results if your polygons are concave and not convex.&amp;nbsp; If your shapes were regular geometric figures and convex it wouldn't be an issue&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jan 2022 05:46:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/compute-the-longest-radius-in-a-polygon/m-p/1136124#M50377</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-01-22T05:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: Compute the longest radius in a polygon</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/compute-the-longest-radius-in-a-polygon/m-p/1136127#M50378</link>
      <description>&lt;P&gt;Since I was working with some geometry, a small demo&lt;/P&gt;&lt;P&gt;Start with a polygon from a featureclass&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="polygon.png" style="width: 323px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/32042iD43C79A27905082E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="polygon.png" alt="polygon.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have helper functions to get what I need from the geometry.&amp;nbsp; There are other ways to get the data into a numpy array, so not a big deal.&amp;nbsp; I also have a helper function to calculate interpoint distances.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# -- array_poly and npg.eucl_dist my helper functions, nice but not needed
p = array_poly([b0], p_type="POLYGON", sr=None, IFT=None)[0][0]
p.getPart(0)
arr = np.asarray([[i.X, i.Y] for i in p.getPart(0)])
dist = npg.eucl_dist(arr[:-1], arr[1:])
max_idx = np.unravel_index(np.argmax(dist, axis=None), dist.shape)

# --  you can get the x,y pairs
p.getPart(0)  # -- the first part (outer-ring) of the first polygon
&amp;lt;Array [&amp;lt;Point (0.0, 0.0, #, #)&amp;gt;, &amp;lt;Point (2.0, 8.0, #, #)&amp;gt;, &amp;lt;Point (8.0, 10.0, #, #)&amp;gt;, &amp;lt;Point (10.0, 10.0, #, #)&amp;gt;, &amp;lt;Point (10.0, 8.0, #, #)&amp;gt;, &amp;lt;Point (9.0, 1.0, #, #)&amp;gt;, &amp;lt;Point (0.0, 0.0, #, #)&amp;gt;]&amp;gt;

arr   # -- points to array
array([[  0.00,   0.00],
       [  2.00,   8.00],
       [  8.00,  10.00],
       [ 10.00,  10.00],
       [ 10.00,   8.00],
       [  9.00,   1.00],
       [  0.00,   0.00]])

dist  # -- the distance matrix
array([[  8.25,  12.81,  14.14,  12.81,   9.06,   0.00],
       [  0.00,   6.32,   8.25,   8.00,   9.90,   8.25],
       [  6.32,   0.00,   2.00,   2.83,   9.06,  12.81],
       [  8.25,   2.00,   0.00,   2.00,   9.06,  14.14],
       [  8.00,   2.83,   2.00,   0.00,   7.07,  12.81],
       [  9.90,   9.06,   9.06,   7.07,   0.00,   9.06]])

max_idx
(0, 2)  # row, col

dist[max_idx]
14.142308257222451&lt;/LI-CODE&gt;&lt;P&gt;The results&amp;nbsp; If you are interested in the helpers let me know.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this only works for convex polygons.&amp;nbsp; For concave polygons, you have to parse out the origin-destination pairs that cross the polygon boundary.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jan 2022 05:58:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/compute-the-longest-radius-in-a-polygon/m-p/1136127#M50378</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-01-22T05:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: Compute the longest radius in a polygon</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/compute-the-longest-radius-in-a-polygon/m-p/1136176#M50392</link>
      <description>&lt;P&gt;Hello Dan. Thank you for your reply. I used the&amp;nbsp;Minimum Bounding Geometry tool and chose&amp;nbsp;Convex hull as the geometric type. It does the job. One thing is that the MBG length is in a very weird unit. So I would like the distance to be measured in mile. A distance that should have been 0.6 mile is displayed as&amp;nbsp;0.009411 in ArcGIS Pro.&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/minimum-bounding-geometry.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/minimum-bounding-geometry.htm&lt;/A&gt;&amp;nbsp;says that the distance unit is the unit of the feature. The spatial reference of the feature is&amp;nbsp;gcs north american 1983. I read from here (&lt;A href="https://gis.stackexchange.com/questions/166525/what-unit-is-the-shape-length-field-in-for-the-gcs-north-american-1983-csrs-proj)" target="_blank"&gt;https://gis.stackexchange.com/questions/166525/what-unit-is-the-shape-length-field-in-for-the-gcs-north-american-1983-csrs-proj)&lt;/A&gt;&amp;nbsp;that the unit of measurement would be degrees. I was wondering whether you know how I could transform the distance unit from degree to mile. Because you know it's not like from meter to mile where I just multiply it by a scalar. Thank you.&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jan 2022 00:25:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/compute-the-longest-radius-in-a-polygon/m-p/1136176#M50392</guid>
      <dc:creator>zhongying_gan</dc:creator>
      <dc:date>2022-01-23T00:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Compute the longest radius in a polygon</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/compute-the-longest-radius-in-a-polygon/m-p/1136184#M50395</link>
      <description>&lt;P&gt;You should really project your data to get the coordinates in planar values.&amp;nbsp; That is the reason for you values, they are in units of decimal degrees and those units are not simply "converted" to planar units.&lt;/P&gt;&lt;P&gt;I would run the analysis using a projected coordinate system appropriate for your area.&amp;nbsp; A conformal projection like UTM, state plane etc would suffice for most purposes&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jan 2022 05:08:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/compute-the-longest-radius-in-a-polygon/m-p/1136184#M50395</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-01-23T05:08:31Z</dc:date>
    </item>
    <item>
      <title>Re: Compute the longest radius in a polygon</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/compute-the-longest-radius-in-a-polygon/m-p/1136240#M50413</link>
      <description>&lt;P&gt;Hello Dan. Thank you for your reply. I projected the map layer onto the state plane projected coordinate system and it worked. Thank you so much.&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jan 2022 23:33:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/compute-the-longest-radius-in-a-polygon/m-p/1136240#M50413</guid>
      <dc:creator>zhongying_gan</dc:creator>
      <dc:date>2022-01-23T23:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Compute the longest radius in a polygon</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/compute-the-longest-radius-in-a-polygon/m-p/1136245#M50414</link>
      <description>&lt;P&gt;glad it worked out&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jan 2022 00:05:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/compute-the-longest-radius-in-a-polygon/m-p/1136245#M50414</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-01-24T00:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: Compute the longest radius in a polygon</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/compute-the-longest-radius-in-a-polygon/m-p/1136978#M50519</link>
      <description>&lt;P&gt;Sorry for my delayed response. It's certainly the best practice to project your data before doing spatial analysis at a relatively local level (vs. global).&lt;/P&gt;&lt;P&gt;In case you want the length calculated in a projected coordinate system (PCS) in the same table, you can use Calculate Geometry Attributes which allows you to specify a PCS for the calculation.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/calculate-geometry-attributes.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/calculate-geometry-attributes.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 17:43:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/compute-the-longest-radius-in-a-polygon/m-p/1136978#M50519</guid>
      <dc:creator>DanLee</dc:creator>
      <dc:date>2022-01-25T17:43:04Z</dc:date>
    </item>
  </channel>
</rss>

