<?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 Re: How do I calculate the average distance between two random points within a polygon? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/how-do-i-calculate-the-average-distance-between/m-p/1705789#M103432</link>
    <description>&lt;P&gt;Can you provide a reference whereby "average distance between two random points within a polygon" is going to give rise to a compactness measure when there other measures which are easy to calculate?&lt;/P&gt;&lt;P&gt;&lt;A href="https://en.wikipedia.org/wiki/Compactness_measure" target="_blank"&gt;Compactness measure - Wikipedia&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jun 2026 21:28:19 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2026-06-02T21:28:19Z</dc:date>
    <item>
      <title>How do I calculate the average distance between two random points within a polygon?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-do-i-calculate-the-average-distance-between/m-p/1705784#M103431</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I am interested in analyzing national borders to give certain nations "compactness" ratings. There are lots of ways to measure compactness of a polygon, but the method I want to use is to calculate the average direct distance between any two random points within the polygon.&lt;/P&gt;&lt;P&gt;I have my national boundary polygon data, and I have converted that to a raster layer with a cell size of 1km x 1km. I plan on converting that raster to point data for this analysis, but since that will take a long time to both generate and load, I want to be sure what I'm going to do with that point data before I generate it.&lt;/P&gt;&lt;P&gt;Since this analysis is on a national level with only a couple hundred polygons, if I have to separate each of the nations out manually and run the analysis separately for each one, I'm willing to do it. That would be a lot of monotonous effort though, so I'd very much prefer to do it all at once.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2026 20:55:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-do-i-calculate-the-average-distance-between/m-p/1705784#M103431</guid>
      <dc:creator>KyraJoiner</dc:creator>
      <dc:date>2026-06-02T20:55:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I calculate the average distance between two random points within a polygon?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-do-i-calculate-the-average-distance-between/m-p/1705789#M103432</link>
      <description>&lt;P&gt;Can you provide a reference whereby "average distance between two random points within a polygon" is going to give rise to a compactness measure when there other measures which are easy to calculate?&lt;/P&gt;&lt;P&gt;&lt;A href="https://en.wikipedia.org/wiki/Compactness_measure" target="_blank"&gt;Compactness measure - Wikipedia&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2026 21:28:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-do-i-calculate-the-average-distance-between/m-p/1705789#M103432</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2026-06-02T21:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do I calculate the average distance between two random points within a polygon?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-do-i-calculate-the-average-distance-between/m-p/1705829#M103435</link>
      <description>&lt;P&gt;I don't see how that's important, but it's a curiosity project for the game Geoguessr. The details are a bit off-topic for this forum, but distance from point to point within a country are relevant in this context.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2026 00:46:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-do-i-calculate-the-average-distance-between/m-p/1705829#M103435</guid>
      <dc:creator>KyraJoiner</dc:creator>
      <dc:date>2026-06-03T00:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do I calculate the average distance between two random points within a polygon?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-do-i-calculate-the-average-distance-between/m-p/1705914#M103441</link>
      <description>&lt;P&gt;You could (1) create random points in a polygon using the&amp;nbsp;&lt;STRONG&gt;Create Random Points&lt;/STRONG&gt; tool. This tool allows you to specify the number of random points and constrain these to certain polygons, like countries.&amp;nbsp; (2) Use a spatial join to join the random points back to the countries dataset (to get polygon names with each random point)&lt;/P&gt;&lt;P&gt;(3) Then use the &lt;STRONG&gt;Near&lt;/STRONG&gt; tool to calculate the distance between all points. Then (4) use &lt;STRONG&gt;Summary Statics&lt;/STRONG&gt; to summarize the output from the &lt;STRONG&gt;Near&lt;/STRONG&gt; tool for each polygon.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2026 13:31:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-do-i-calculate-the-average-distance-between/m-p/1705914#M103441</guid>
      <dc:creator>MervynLotter</dc:creator>
      <dc:date>2026-06-03T13:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do I calculate the average distance between two random points within a polygon?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-do-i-calculate-the-average-distance-between/m-p/1706364#M103501</link>
      <description>&lt;P&gt;Hello! That's a good idea, but when I ran the Near tool, it only calculates the distance to the nearest point, which makes it completely unrelated to the shape of the polygon. I'm looking to measure the distance from each point to every other point.&lt;/P&gt;&lt;P&gt;I've decided to do this country by country as the number of points I needed to generate all at once was far too large.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2026 19:33:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-do-i-calculate-the-average-distance-between/m-p/1706364#M103501</guid>
      <dc:creator>KyraJoiner</dc:creator>
      <dc:date>2026-06-04T19:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do I calculate the average distance between two random points within a polygon?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-do-i-calculate-the-average-distance-between/m-p/1706461#M103505</link>
      <description>&lt;P&gt;Then try the &lt;STRONG&gt;Generate Origin-Destination Link&lt;/STRONG&gt;s tool. I suspect it may work as it links up each point to all other points and includes a link distance field, and the ability to separate the dataset into groups (like countries). Do see &lt;A href="https://doc.esri.com/en/arcgis-pro/latest/tool-reference/analysis/generate-origin-destination-links.html?tabs=dialog" target="_blank"&gt;Generate Origin-Destination Links (Analysis Tools) | ArcGIS Pro documentation&lt;/A&gt;. You can use the same layer for input and destination features.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure how many random points you will have but a dataset of 1600 points will quickly balloon into 2.5 million+ lines (without grouping)&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2026 07:29:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-do-i-calculate-the-average-distance-between/m-p/1706461#M103505</guid>
      <dc:creator>MervynLotter</dc:creator>
      <dc:date>2026-06-05T07:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I calculate the average distance between two random points within a polygon?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-do-i-calculate-the-average-distance-between/m-p/1707673#M103596</link>
      <description>&lt;P&gt;Can you elaborate on the point feature class please:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Do these points fall inside the polygon, or along the border of the polygon?&lt;/LI&gt;&lt;LI&gt;Are you only generating two random points per country, or do you want to generate a larger number of points and then randomly select just two? If you did the latter, you could easily bootstrap a bunch of point pairs per country to get a better sense of the mean and variance, instead of just relying on a single random data point.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I wouldn't do it by hand, this could definitely be done with arcpy once you've clarified the workflow.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2026 19:13:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-do-i-calculate-the-average-distance-between/m-p/1707673#M103596</guid>
      <dc:creator>BrennanSmith1</dc:creator>
      <dc:date>2026-06-11T19:13:19Z</dc:date>
    </item>
  </channel>
</rss>

