Is there an equivalent method in the Geometry class in the ArcGIS API for Python to the "Have their center in" operation that is used selecting by location in ArcGIS Pro?
I'm trying to create a script in an AGOL Notebook that will query taxlots with their centers inside an unincorporated communities polygon.
Solved! Go to Solution.
it isn't in your extensive list, not online, so your plan of course would be to use
true_centroid (a true centroid if it is within or on the feature) since they also lack a labelPoint method
This would only be of concern if you have extremely concave polygons
it isn't in your extensive list, not online, so your plan of course would be to use
true_centroid (a true centroid if it is within or on the feature) since they also lack a labelPoint method
This would only be of concern if you have extremely concave polygons
Thanks Dan! I'll continue forward with your advice. I'll post my solution once I complete it...
The methods below worked great.
dc_taxlots_sdf["CENTROIDS"] = dc_taxlots_sdf["SHAPE"].apply(lambda g: g.true_centroid)
dc_taxlots_sdf["SUNRIVER_TAXLOTS"] = dc_taxlots_sdf["CENTROIDS"].apply(lambda x: x.within(sb_geom_3857))