1

I have a polygon layer with a 'lot' field, and a points layer.

How can I use python to select the points by location (to find what points are contained in what polygons) and assign the value in the 'lot' field from the polygon layer to the point that is contained in the relevant polygon feature?

2
  • possible duplicate of Identify geographic location to points
    – radouxju
    Commented Mar 7, 2014 at 6:20
  • @radouxju That is a QGIS Question while this one is ArcGIS for Desktop so not a duplicate as far as I can tell.
    – PolyGeo
    Commented Mar 7, 2014 at 8:20

1 Answer 1

1

You could do this by simply using the Intersect (Analysis) tool interactively, but if you want to use Python then a syntax something like this should work ...

arcpy.Intersect_analysis ["point_layer", "poly_layer"], out_feature_class, "ALL", "", "")

Either way if the poly_layer has a field called Lot, then that should be present and populated in the output feature class (also points).

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.