Select to view content in your preferred language

MakeNetworkDatasetLayer with Enterprise NA and StreetMap Premium

212
1
Jump to solution
06-04-2024 12:10 PM
ChrisCowin_dhs
New Contributor III

Working on a larger problem here. And one suggestion there is to start working in the more modern NAX functions and not the older NA functions.

I can't seem to find any documentation on how to input the `in_network_dataset` from a portal URL which is how I'm assuming how my users are expected to access it instead of downloading the entire thing locally which seems like it is missing the entire point of being on Enterprise in the first place.

All the documentation here, is pointing to local file locations.

Assuming I'm having a fundamental misunderstanding but I can't figure out what I should be doing.

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
MelindaMorang
Esri Regular Contributor

Network dataset layers are only for network datasets, not for portal services.  To use a service URL as the network data source, just use the URL directly instead of trying to make it into a network dataset layer first.

arcpy.na.MakeClosestFacilityAnalysisLayer("https://myportal.mydomain.com/portal/")

or

arcpy.nax.ClosetFacility("https://myportal.mydomain.com/portal/")

View solution in original post

1 Reply
MelindaMorang
Esri Regular Contributor

Network dataset layers are only for network datasets, not for portal services.  To use a service URL as the network data source, just use the URL directly instead of trying to make it into a network dataset layer first.

arcpy.na.MakeClosestFacilityAnalysisLayer("https://myportal.mydomain.com/portal/")

or

arcpy.nax.ClosetFacility("https://myportal.mydomain.com/portal/")