I have a multipart feature class of cities. I want to run a search cursor on a cities feature class where:
arcpy.MakeFeatureLayer_management(city, c_layer) cCursor = arcpy.SearchCursor(c_layer) print "Created search cursor on c_layer"arcpy.MakeFeatureLayer_management(parcel, p_layer)for row in cCursor: geoName = row.getValue("GEO_NAME") print geoName geoID = row.getValue("GEO_ID") print geoID arcpy.SelectLayerByLocation_management(p_layer, "WITHIN_A_DISTANCE", c_layer, search_radius, "NEW_SELECTION") print "Completed select by location on p_layer" y = arcpy.GetCount_management(p_layer) print y
أكثر...
- one city is selected and a select layer by location is run to select all parcels that are within a certain distance X;
- Values from the selected parcels are then summed together;
- move on to the next city record
arcpy.MakeFeatureLayer_management(city, c_layer) cCursor = arcpy.SearchCursor(c_layer) print "Created search cursor on c_layer"arcpy.MakeFeatureLayer_management(parcel, p_layer)for row in cCursor: geoName = row.getValue("GEO_NAME") print geoName geoID = row.getValue("GEO_ID") print geoID arcpy.SelectLayerByLocation_management(p_layer, "WITHIN_A_DISTANCE", c_layer, search_radius, "NEW_SELECTION") print "Completed select by location on p_layer" y = arcpy.GetCount_management(p_layer) print y
أكثر...