I have a polygon layer as a grid.
I have a points layer (road intersection).
I would like to select or export the most central point from each polygon.
Solved! Go to Solution.
I thought the same thing that @DanPatterson suggested.
I just think you need to add an extra step to the solution he gave. You should first select the polygons that intersect with your road intersection points to create the centroid only in the polygon that intersects with the points. If you don’t do it, the closest intersection point to the centroid may be outside of the polygon and will not be the most central point of that square.
You can also define a Search Radius when running the near Tool, but the buffer area will be a circle and will be slightly bigger or smaller than the grid square.
Hello Nicolas!
By your description, I think you used the Intersection points as your input to the Near tool. But you should use the Centroid as your Input Feature.
The Near Tool will create some fields in your Centroid feature, by default is Feature ID and Distance. The Feature ID field is the OBJECTID of your closest intersection point.
You can use this field to do a relationship between your tables with Add Relate Tool using the NEAR_FID in the Centroid and the OBJECTID of your Intersection Points.
After the relate, you can select your Intersection Points based on the Feature ID in the Centroid table. You can export the selected feature as your most central point having all the original attributes.
Get the centroids of your polygons
Feature To Point (Data Management)—ArcGIS Pro | Documentation
find the nearest one
Near (Analysis)—ArcGIS Pro | Documentation
I thought the same thing that @DanPatterson suggested.
I just think you need to add an extra step to the solution he gave. You should first select the polygons that intersect with your road intersection points to create the centroid only in the polygon that intersects with the points. If you don’t do it, the closest intersection point to the centroid may be outside of the polygon and will not be the most central point of that square.
You can also define a Search Radius when running the near Tool, but the buffer area will be a circle and will be slightly bigger or smaller than the grid square.
thanks Dan and Pedro,
I have almost finished my project.
1. I selected via atributes the polygons containing points from my points layer (intersections) to have no points outside my polygon.
2. Of these polygons, I searched the Centroid with "Feature to Point".
3. I searched for the distance from the points to the centroid with "Near"
4. I filtered the layer created with Near using "Summary Statistics.
This creates a table of the relevant points but all other atributes are not included with the table.
This is where I'm still stuck.
Question:
Can I add a unique value like OBJECTID in "Summary Statistics" to then be able to create a join with my original layer?
Hello Nicolas!
By your description, I think you used the Intersection points as your input to the Near tool. But you should use the Centroid as your Input Feature.
The Near Tool will create some fields in your Centroid feature, by default is Feature ID and Distance. The Feature ID field is the OBJECTID of your closest intersection point.
You can use this field to do a relationship between your tables with Add Relate Tool using the NEAR_FID in the Centroid and the OBJECTID of your Intersection Points.
After the relate, you can select your Intersection Points based on the Feature ID in the Centroid table. You can export the selected feature as your most central point having all the original attributes.
There should be an ID field in the summary statistics table which you can use to "join" back to the polygon grid featureclass or its point centroid representation
Thanks to all it works.
- First select the polygons with data (Select by location)
- Then, Feature to point for the Centroid.