<?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: Switch to centroids in the Near tool in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/switch-to-centroids-in-the-near-tool/m-p/1248968#M64321</link>
    <description>&lt;P&gt;So, as you discovered, if a point is within a polygon, NEAR_DIST will be zero.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_0-1674024491020.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/60618iE840DBB18F26DCAB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_0-1674024491020.png" alt="JohannesLindner_0-1674024491020.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;JohannesLindner_0-1674024491020.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There's no way to switch to centroid in the Near tool. You have to do an extra step:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/feature-to-point.htm" target="_blank"&gt;Feature To Point (Data Management)—ArcGIS Pro | Documentation&lt;/A&gt;&amp;nbsp;to get the centroids of the polygons. Then run the Near tool with these centroids.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_1-1674024759061.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/60619iA81AAD31236F228E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_1-1674024759061.png" alt="JohannesLindner_1-1674024759061.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;JohannesLindner_1-1674024759061.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While this results in NEAR_DIST &amp;gt; 0, it loses the relationship to the polygons, because NEAR_FID uses the ObjectID of the centroids and you can't switch that to ORIG_FID (the ObjectID of the polygons).&lt;/P&gt;&lt;P&gt;If you need the OBJECTIDs of the polygons, you have to use&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/join-field.htm" target="_blank"&gt;Join Field (Data Management)—ArcGIS Pro | Documentation&lt;/A&gt;, joining Centroids.ORIG_FID to the station fc with the relation Centroids.OBJECTID = stations.NEAR_FID&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_2-1674025077298.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/60620i28900FCFAA461294/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_2-1674025077298.png" alt="JohannesLindner_2-1674025077298.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;JohannesLindner_2-1674025077298.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Jan 2023 06:58:40 GMT</pubDate>
    <dc:creator>JohannesLindner</dc:creator>
    <dc:date>2023-01-18T06:58:40Z</dc:date>
    <item>
      <title>Switch to centroids in the Near tool</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/switch-to-centroids-in-the-near-tool/m-p/1248958#M64319</link>
      <description>&lt;P&gt;I need to measure distances from areas, represented by polygons, to rail stations, represented by points. I use the Near tool, but the issue is that many stations are within the polygons and the distance is zero. I'd like to measure the distances from stations (points) to the centroids of the polygons instead. Is there a way to switch to this method of measurement?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 04:03:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/switch-to-centroids-in-the-near-tool/m-p/1248958#M64319</guid>
      <dc:creator>Mikhail</dc:creator>
      <dc:date>2023-01-18T04:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: Switch to centroids in the Near tool</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/switch-to-centroids-in-the-near-tool/m-p/1248968#M64321</link>
      <description>&lt;P&gt;So, as you discovered, if a point is within a polygon, NEAR_DIST will be zero.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_0-1674024491020.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/60618iE840DBB18F26DCAB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_0-1674024491020.png" alt="JohannesLindner_0-1674024491020.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;JohannesLindner_0-1674024491020.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There's no way to switch to centroid in the Near tool. You have to do an extra step:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/feature-to-point.htm" target="_blank"&gt;Feature To Point (Data Management)—ArcGIS Pro | Documentation&lt;/A&gt;&amp;nbsp;to get the centroids of the polygons. Then run the Near tool with these centroids.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_1-1674024759061.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/60619iA81AAD31236F228E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_1-1674024759061.png" alt="JohannesLindner_1-1674024759061.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;JohannesLindner_1-1674024759061.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While this results in NEAR_DIST &amp;gt; 0, it loses the relationship to the polygons, because NEAR_FID uses the ObjectID of the centroids and you can't switch that to ORIG_FID (the ObjectID of the polygons).&lt;/P&gt;&lt;P&gt;If you need the OBJECTIDs of the polygons, you have to use&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/join-field.htm" target="_blank"&gt;Join Field (Data Management)—ArcGIS Pro | Documentation&lt;/A&gt;, joining Centroids.ORIG_FID to the station fc with the relation Centroids.OBJECTID = stations.NEAR_FID&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_2-1674025077298.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/60620i28900FCFAA461294/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_2-1674025077298.png" alt="JohannesLindner_2-1674025077298.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;JohannesLindner_2-1674025077298.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 06:58:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/switch-to-centroids-in-the-near-tool/m-p/1248968#M64321</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-01-18T06:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: Switch to centroids in the Near tool</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/switch-to-centroids-in-the-near-tool/m-p/1249351#M64371</link>
      <description>&lt;P&gt;Dear Johannes, great, thank you so much! I followed your advice and obtained the results I was looking for.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 04:50:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/switch-to-centroids-in-the-near-tool/m-p/1249351#M64371</guid>
      <dc:creator>Mikhail</dc:creator>
      <dc:date>2023-01-19T04:50:53Z</dc:date>
    </item>
  </channel>
</rss>

