Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am trying to implement a python script that creates in a first step a Network Dataset and that in a second step gets a point feature class for which the tool should create for each feature in the feature class a service area. The first step is no problem, but the second...

My first idea was to use the cursors in python which should run through the whole attribute table. For each feature a temporary feature class should be created which should be used as input for the service area.

Is this the right direction or is there an more easy way to calculate for each feature individually a service area?

Thanks for any tips or suggestions!

share|improve this question

1 Answer 1

up vote 3 down vote accepted

You can use the Make Service Area Layer, Add Locations, Solve, and Save to layer file geoprocessing tools to generate service areas for multiple input features (e.g. a point layer with geocoded addresses). This is analagous to the workflow using the ArcMap GUI described in the Service area analysis help topic.

enter image description here

enter image description here

share|improve this answer
    
But is it also possible to create for each facility an shapefile that shows the service area? –  Sven Jan 10 '13 at 20:33
    
@Sven The output of the service area analysis is a polygon shapefile like the one shown above. You can export this to a regular shapefile. –  dmahr Jan 10 '13 at 20:37
    
I know, but I want that the script creates for each facility an service area shapefile. Regarding your example I will have at the end 5 shapes. One for each facility. Is this possible? –  Sven Jan 10 '13 at 20:45
2  
Yes you can, after you calculate the output service areas, you can use my answer here to split it by atribute (in your case a Id atribute of your locations) –  Alexandre Neto Jan 10 '13 at 21:19
    
Thanks, Alexandre! But how can I reach the the results layer "polygon" to split the service areas? The Service Area layer consists of several sub-layers: facilities, point barriers, lines, etc. I want to reach the result layer "polygons". Is there a way in python? –  Sven Jan 11 '13 at 6:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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