Tag Info

New answers tagged

2

If you are running this in the Python window, then you need go to the Geoprocessing menu -> Geoprocessing Options and check the setting for "Overwrite the outputs of geoprocessing operations". If it is not checked than the script is behaving correctly, since your current setting is not supposed to not let tools overwrite outputs. Once that setting is ...


1

A Python solution: after creating the field to store your counts, include the neighborhood 'SHAPE@' field in your UpdateCursor, then for each row call Select By Location using the individual geometry as the input, rather than the entire feature class. with arcpy.da.UpdateCursor(neighborhoods_fc, ['SHAPE@', 'COUNT_FIELD']) as cursor: ...


0

You don't need to involve arcpy cursors for this. You can do this either in ArcMap GUI by right-clicking the Neighborhoods layer in the TOC and choosing Joins and Relates > Join. Then: And then you will get a new feature class with a new field Count where the number of schools is supplied: Since you want to write a Python script, you would use the ...



Top 50 recent answers are included