AnsweredAssumed Answered

Generate Service Area tool skipping polygon generation when run with Arcpy command

Question asked by mmooreWPC on Sep 17, 2018
Latest reply on Sep 17, 2018 by mmooreWPC

I created a tool that uses service areas to group points that are within a certain distance from one another along a network (in my case, a river system). The concept of the tool works. However, when I run it, the Generate Service Areas geoprocessing step does not produce polygons around all input point 'facilities' when run with the Python code.

 

I tried running the same datasets manually with the Network Analyst toolbar and window and all polygons were successfully created. I also tried running the same dataset through the Generate Service Areas geoprocessing tool and it also generated all polygons as expected.

 

However, when I run the Python code snippet from the Python window or from within my custom tool, it randomly skips polygon creation for several of the point 'facilities'. This is my code snippet for the generate service areas step:

 

    species_pts = 'species_pts'
    sep_distance = 500
    scratchGeodatabase = r'C:\Users\mmoore\Documents\ArcGIS\Default.gdb'
    arcpy.GenerateServiceAreas_na(species_pts,sep_dist,"Meters",network,os.path.join(scratchGeodatabase,"service_area"),Polygons_for_Multiple_Facilities="MERGE",Detailed_Polygons="DETAILED_POLYS")

Outcomes