I have a section grid for a US state. I also have a quarter/quarter section grid which splits the section grid into 16 equal squares.

I have written a Python script that finds the XY coordinates of the centroid of each quarter/quarter section, so 16 of them.

I need to create a temporary point feature at that centroid and then run a Select by Location on that point to see which quarter/quarter section it falls within and then I will be adding an attribute to that quarter/quarter section the point falls in.

How can I create this temporary point feature to be used in a Select by Location? Is there a way to create a single point in memory?

1 Answer 1


I found an example that used the Point geometry, for example:

point = arcpy.Point(x, y)
point_geom = arcpy.PointGeometry(point)

Then you can use that in a Select by Location

arcpy.SelectLayerByLocation_management("Layer", "CONTAINS", point_geom)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.