I have a set of polygons and I want to add a field with the name of the streets (from another feature class of streets) that are within each polygon. Using Select Features by Location, I select streets that are within the polygons, but I can't think of a way (using python) to automate the process of populating each polygon with the name of the street that falls within it. I don't have a matching field for either feature class to base a join on. Is this possible or is it something that would have to be done manually?
Tell me more
×
Geographic Information Systems Stack Exchange is a question and answer site for
cartographers, geographers and GIS professionals. It's 100% free, no registration required.
|
|
Try something to do with this, it is the idea, but it mostly untested, but i am sure it good and it's should work: This "your_streets" and "your_polygons" are your feature classe. cursor=arcpy.SearchCursor(your_streets) for street in cursor:
|
||||
|
|
|
The analysis that you want to do, might be a bit strange, as you may have lots of streets passing trough your polygons, and it might be complicated put all that in a single field, but I do not know your dataset, so it might be perfectly reasonable. A quite easy way would be to use the following algorithm that you can process in a Python Script:
Remember that if the join of the street names from any polygon is bigger than 155 character you will have problems... |
|||
|
|