Anyone know how to trim service area polygons from a network analysis in ArcPro? It seems to have a default setting of 100 meters and I don't see a way to change this.
Unfortunately ArcMap keeps crashing due to the complexity of my network - otherwise it is simple to adjust this parameter there. I was able to get results after 13 hours in Pro, but saw that it trimmed my polygons too short. Any ideas?
Solved! Go to Solution.
The trim settings are not currently accessible from the UI in Pro. You have two options:
# Get the current ArcGIS Pro project: doc = arcpy.mp.ArcGISProject('current') # Get the current map (note, if you have more than one map, # you might need to change the index from 0 to something else) mapObj = doc.listMaps()[0] # Get the Service Area layer object (might need to change the string # 'Service Area' to match the SA layer's actual name) layerObj = mapObj.listLayers('Service Area')[0] # Get the Service Area solver properties object props = arcpy.na.GetSolverProperties(layerObj) # Whether or not to trim polygons props.trimPolygons = "TRIM_POLYS" # Trim distance props.trimDistance = "50 meters"
The trim settings are not currently accessible from the UI in Pro. You have two options:
# Get the current ArcGIS Pro project: doc = arcpy.mp.ArcGISProject('current') # Get the current map (note, if you have more than one map, # you might need to change the index from 0 to something else) mapObj = doc.listMaps()[0] # Get the Service Area layer object (might need to change the string # 'Service Area' to match the SA layer's actual name) layerObj = mapObj.listLayers('Service Area')[0] # Get the Service Area solver properties object props = arcpy.na.GetSolverProperties(layerObj) # Whether or not to trim polygons props.trimPolygons = "TRIM_POLYS" # Trim distance props.trimDistance = "50 meters"