I'm running the Feature to Point tool in ArcGIS Pro 3.4.2 on a set of polygons in order to create centroid points within those polygons. The tool keeps throwing an error when it gets to a very, very small polygon in my feature class (see screenshot below for visual and note the length and area fields, UTM coordinates).
The error thrown suggests there could be something wrong with the geometry and that I should run the Repair Geometry tool. I have done so, but there's no indication of any geometry errors and the Feature to Point tool still throws the same error afterwards.
Is this a known bug with this tool? Or is there some sort of minimum geometry threshold required to run the tool? I haven't found anything in the tool documentation, but I did find an older blog post from someone experiencing the same issue with the tool on ArcGIS 10.1 (https://gis.stackexchange.com/questions/204341/feature-to-point-for-very-small-polygon-in-arcgis-des...).
I should note that when I delete this polygon from my feature class the Feature to Point tool runs as expected.
Solved! Go to Solution.
Out of curiosity, are you able to get the centroid of that polygon, or does it break?
If you can, you could just calculate the centroid for each feature and then do like a XY Table to Point on the whole table.
Finding the centroid (open the python window and paste this in)
#Make sure to select that polygon first
aprx = arcpy.mp.ArcGISProject("CURRENT")
mp = aprx.activeMap
lay = mp.listLayers("YourLayerNameHere")[0]
with arcpy.da.SearchCursor(lay, ['SHAPE@']) as cursor:
for row in cursor:
print(row[0].centroid)
Field Calculating the Centroid
I don't think it's documented, but there does seem to be a minimum feature size; I'm zoomed in at 1:0.04 here and it won't let me finish this polygon
I think the minimum may be like 1cm in any direction.
Good morning - so I'm not seeing a minimum geometry threshold in the documentation (both internal and external) for the Feature to Point GP tool but based upon the error message, there is something. All I've seen is that very small polygons do throw an error. As you described, deleting the very small polygon does allow the tool to run properly. Not sure what the solution is in this instance - I don't think it's a bug rather a tool limitation.
Out of curiosity, are you able to get the centroid of that polygon, or does it break?
If you can, you could just calculate the centroid for each feature and then do like a XY Table to Point on the whole table.
Finding the centroid (open the python window and paste this in)
#Make sure to select that polygon first
aprx = arcpy.mp.ArcGISProject("CURRENT")
mp = aprx.activeMap
lay = mp.listLayers("YourLayerNameHere")[0]
with arcpy.da.SearchCursor(lay, ['SHAPE@']) as cursor:
for row in cursor:
print(row[0].centroid)
Field Calculating the Centroid
I don't think it's documented, but there does seem to be a minimum feature size; I'm zoomed in at 1:0.04 here and it won't let me finish this polygon
I think the minimum may be like 1cm in any direction.
Thank you for the suggestion. I was able to manually calculate the XY centroid for this polygon in particular---both using the Python script you provided and the Calculate Geometry tool. The resulting XY point appears to be correct (see below).
I've been using the Feature to Point tool in a custom script to convert mapped topography contours into polygons and then automatically labelling the elevation range of each polygon based on their bounding contour value.
For now, I'll revise the script to calculate and generate the centroid points using your suggested method. I think this is something worthy of investigating further at Esri though. It seems a bit silly that I can produce an inside centroid point through this method yet the Feature to Point tool fails to do so.
Thanks all for the suggestions and comments. Can this thread be moved or flagged in some way so that someone can take a closer look at the Feature to Point tool? I'm hesitant to mark anything as a solution just yet and risk sweeping this under the rug.
Your best bet is to submit an Esri support ticket for this. You can describe the problem as above and link to this page.
They'll see if they can replicate, then maybe we get a bug or an enhancement out of it.
It looks like the polygon of interest is a sliver polygon resulting from a GP overlay operation. You might consider incorporating it into an adjacent polygon.
Otherwise, you might try the Inside option in the Feature to Point tool to see if will force a point inside the polygon.