Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifying for Service Area #11

Closed
Sirocco97 opened this issue Aug 10, 2021 · 2 comments
Closed

Modifying for Service Area #11

Sirocco97 opened this issue Aug 10, 2021 · 2 comments

Comments

@Sirocco97
Copy link

How do I adapt this code to utilise Service Area analysis rather than OD Cost Matrix, and to also loop through multiple polygon barrier files?

@mmorang
Copy link
Collaborator

mmorang commented Jan 31, 2022

Hello @Sirocco97. My apologies for the delay in response. I didn't see your issue until just now for some reason (and I adjusted my notification settings so it won't happen again).

In theory, you should be able to retain most of the structure of the OD Cost Matrix script and just swap in Service Area. Here is some helpful documentation for the ServiceArea network analysis solver class and its associated result object:
https://pro.arcgis.com/en/pro-app/latest/arcpy/network-analyst/servicearea.htm
https://pro.arcgis.com/en/pro-app/latest/arcpy/network-analyst/servicearearesult.htm

If you have never worked with these solver objects at all before, you will benefit from reading the overview help topic here: https://pro.arcgis.com/en/pro-app/latest/arcpy/network-analyst/performing-network-analysis.htm

If you're just generating Service Area polygons for a large number of facilities, you can strip out a lot of the optimizations for OD Cost Matrix. For example, you don't need to pre-select destinations within a straight-line cutoff of origins since this doesn't apply to Service Area. I suspect your modifications will largely involve deleting code that doesn't apply.

Depending on the size of your problem, you might want to first try just solving it straight in ArcGIS Pro without this special parallelization script. In recent releases of ArcGIS Pro, we have made some enhancements to the Service Area solver when using a network dataset in a mobile/sqlite geodatabase. This parallelizes the solve internally and, depending on your problem size, may be fast enough for you. To get your network dataset into this format, you need to run the Create Mobile Map Package tool, or use the pane in the ArcGIS Pro UI, and then extract the package. You can contact Esri Support if you need help with this.

@mmorang
Copy link
Collaborator

mmorang commented Jan 6, 2023

I'm going to assume this question has been adequately answered. Feel free to reopen if you still have questions.

@mmorang mmorang closed this as completed Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants