How to trim service area polygons in ArcPro

386
1
Jump to solution
09-27-2017 07:46 AM
Highlighted
New Contributor III

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?

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Esri Regular Contributor

The trim settings are not currently accessible from the UI in Pro.  You have two options:

  1. To create the Service Area layer, use the Make Service Area Analysis Layer geoprocessing tool.  You can adjust the trim settings in the Output Geometry section of the tool dialog.  Once the layer is created, though, you can't use the UI to adjust the settings again.
  2. For an existing layer, you can use the python window and NA solver properties to adjust the trim settings:
# 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"

View solution in original post

1 Reply
Highlighted
Esri Regular Contributor

The trim settings are not currently accessible from the UI in Pro.  You have two options:

  1. To create the Service Area layer, use the Make Service Area Analysis Layer geoprocessing tool.  You can adjust the trim settings in the Output Geometry section of the tool dialog.  Once the layer is created, though, you can't use the UI to adjust the settings again.
  2. For an existing layer, you can use the python window and NA solver properties to adjust the trim settings:
# 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"

View solution in original post