Coder Social home page Coder Social logo

esri / network-analysis-services Goto Github PK

View Code? Open in Web Editor NEW
20.0 10.0 8.0 1.49 MB

Geoprocessing tools to publish directions, routing, and logistics services available on ArcGIS Online to your own ArcGIS for Server site

License: Apache License 2.0

Python 100.00%

network-analysis-services's Introduction

network-analysis-services

Here are the geoprocessing (GP) tools to publish directions, routing, and logistics services available on ArcGIS Online to your own ArcGIS for Server site and configure the services with your Portal for ArcGIS.

Instructions

Follow the instructions from the wiki to publish the services.

Requirements

  • ArcGIS for Server 10.4 or later
  • ArcGIS for Desktop 10.4 or later
  • A network dataset from Esri StreetMap Premium 2015 Release 1 or later or your own network dataset

Resources

Issues

Find a bug or want to request a new feature? Please let us know by submitting an issue.

Contributing

Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.

Licensing

Copyright 2016 Esri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

A copy of the license is available in the repository's license.txt file.

[](Esri Tags: ArcGIS Server Routing Services) [](Esri Language: Python)​​​​​​​​​​​​​​​

network-analysis-services's People

Contributors

deelesh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

network-analysis-services's Issues

"A python error occurred"

Tool fails with "A python error occurred. Details have been logged to C:\arcgis\ArcTutor\ArcScan\ExerciseData\PublishRoutingServices.log
Traceback (most recent call last):
File "", line 280, in execute
File "C:\Users[user]\Desktop\network-analysis-services-2.1\ut.py", line 1037, in execute
street_points = [cursor.next()[0], cursor.next()[0]]
StopIteration"

Using my own network dataset generated from OSM data (covering city of Chicago) and using ArcMap 10.5.1 with ArcGIS Enterprise 10.6 with Network Analyst enabled on both ends. ArcGIS Enterprise is a Linux install using Portal federated with ArcGIS Server.

publishing/paths issue with supporting files

I've run into this issue a few times with the v1.2 of the tools (running ArcGIS 10.4.1). I think it is isolated to arcgis server sites where the config-store and directories locations have been reconfigured to us a shared drive location such as a NAS file share. I have one system where the config-store and directories are local (C:) and another system where they are in a shared location. This issue only seems to happen with the shared location configuration.

The issue is a failure to update the published path of the "ndsupportingfiles" folder in the serves. This causes failures with the routing tool and other solvers. Digging through the network traffic I've found an error where the services are trying to find the "defaulttravelmodes.json" file this path:

"original publishing location"\0\v101\ndsupportingfiles

rather than where they should be found in:

\"sharedrivelocation"\arcgisserver\directories\arcgissystem\arcgisinput\Routing\NetworkAnalysis.GPServer\extracted\v101\ndsupportingfiles

If I replicate the exact path the service is looking for (path to original publication location) on the server and copy the ndsupportingfiles into that location, this repairs the issues with the services not functioning properly.

Geocoding

Not sure if this is the right place to ask, but as SMP also provides geocoding, is there a similar guide on how to set that up for geocoding? Or for geocoding, can I use my own geocoder that is served up from ArcGIS Server?

Failed To Create Supporting Files

It looks like I may have gotten past the first issue, but now this issue:
Creating supporting files at C:\Users\SmithV\Documents\ArcGIS\scratch\NDSupportingFiles
Failed to create supporting files in C:\Users\SmithV\Documents\ArcGIS\scratch\NDSupportingFiles
A geoprocessing error occurred. Details have been logged to \COAFS3\GISShare\Services\Routing\PublishRoutingServices.log
Completed script PublishRoutingServices...
Failed to execute (PublishRoutingServices).
Failed at Wed May 08 16:04:41 2019 (Elapsed Time: 1 minutes 9 seconds)

I can manually create this file, then run the Publish Routing Services tool and the script deletes it but then the error happens.

Support network dataset created from your own street data when publishing routing services

Currently Publish Routing Services tool can return a failure if the input network dataset is not from StreetMap premium.

Often times an organization maintains a network dataset that is built from their own street data. The publish routing services tool should support such network datasets.

If a network dataset does not meet the minimum requirements, the tool should provide messages on what is missing from the network dataset

FindRoutes ExecuteError

I'm using v2.1 and am using these parameters. What am I doing wrong? Desktop and server are on the same machine.
image001

-NetworkAnalysis_NAserver.sd is created
-NetworkAnalysisUtilities_GPServer.sd is created

ERROR | 2018-04-16 15:40:33 | GPMessageFileLogger | nas | exception | 352 | A geoprocessing error occurred. Details have been logged to C:\SD_files\PublishRoutingServices.log
Traceback (most recent call last):
File "", line 280, in execute
File "C:\Users\COGIS001\Desktop\network-analysis-services-master\ut.py", line 1061, in execute
find_routes_result = nast.FindRoutes(rt_stops, "Minutes", supporting_files_folder)
File "C:\Users\COGIS001\Desktop\network-analysis-services-master\NetworkAnalysisTools.pyt", line 3989, >in FindRoutes ExecuteError: Failed to execute. Parameters are not valid.
The network dataset Routing_ND is referenced with a catalog path instead of a network dataset layer
Failed to execute (FindRoutes).

Regarding supporting files

I need help in running 'Create Supporting Files' tool but getting error when used my NDS data with it.
Can I get any information for how we can run this tool? What all these files are about? Are they mandatory for publishing the Routing services?

PublishRoutingServices tool should check if the server used to publish routing services has a valid network analyst license

If the server used for publishing routing services does not have a network analyst license, the PublishRoutingServices tool does not provide a useful error message as evidenced in #14.

Since the PublishRoutingServices tool connects to the server as an administrator, it can perform the license check and provide a better error message.

Thanks to @selsoz for reporting this issue.

ERROR 001369 Failed to create the service

We are using StreetMap Premium 2015 Release 3. The GP tool created four sd file successfully, but it failed when ArcGIS for Server tries to start the service. From the GP tool, it threw ERROR 001369 Failed to create the service.

In Server Manager, NetworkAnalysis.MapServer, NetworkAnalysisUtilities.GPServer were started successfully. But when we tried to started NetworkAnalysis.GPServer, and NetworkAnalysisSync.GPServer, it gave error in Server Manager, com.esri.arcgis.discovery.servicelib.AGSException

Just wonder if there any similar issue. I have feeling that the ArcGIS for Server might be corrupted.

Thanks.
log.txt

Issue publishing to a federated hosting server

I have followed the steps in the wiki to prep the data and publish the GP service to our federated 10.4 ArcGIS Server that also includes ArcGIS Data Store.

Only have two mosaic datasets.
Believe I have followed the guide correctly and tool works fine in ArcMap. Fails to publish to Server with the 'Consolidating the data failed' error.

Any ideas how to troubleshoot this further? Can't see anything obvious in the ArcGIS Server logs either.

failtopublish

Regarding Arcpy Overwriteoutput property

Hi,

I'm facing an issue with the use of arcpy.overwriteoutput property.

I have one Python script which performs some Geo-Processing operations and at the end generates one final table named suppose "CITY_NEW". It gets created on the production server after each run of the script daily.
I have kept arcpy.overwriteoutput option set to True so that it will always replaces the old table with the newly created one.

My issue is, for sometimes script does get ended with the error saying "Table name 'CITY_NEW' already exists". But some times it gets completed successfully without any error.
Is it because the output table "CITY_NEW" may be open in some other application or getting accessed by some user while the script is replacing it? I tried doing this by keeping that table open on one system and running the script manually. This also gets ended with the same error.

If so, then why here arcpy.overwriteoutput property is not working as expected?

Please help me out with this. Do i required to provide some more details?

Thanks in advance.

Error publishing

I have ESMP 2016 R1 for Asia Pacific with a full license, and have already published geocoding services and registered with ArcGIS Enterprise 10.5 (federated, all on one machine, domain certificates applied)

I am now trying to run through these steps to publish the network-analysis-services, but hit what I hope is a trivial issue when publishing:

  • Routing_ND located in this GDB:
    image

  • Created an empty folder for the SD files:
    image

  • Logged into ArcMap as a portal admin (portaladmin)

  • Have the 10.5 tools downloaded to D:\ESMP\network-analysis-services-2.0

  • Settings when running the tool:
    image

Error:
image

This is whilst I am logged into the portal in ArcMap as portaladmin.
PublishRoutingServices.log never gets created.

Any suggestions? I am sure it is something small I have missed.

10.5 - Still require ESMP?

At 10.4.1, I understand that the Analysis services require the Street Map Premium product to be used for the analysis services. Is this still the same at 10.5?

Issues with NetworkAnalysisUtilities in Portal

DETAILS
Services created successfully on non-hosted server that is accessible to Portal
No errors occurred during run of tools
All services except OD Matrix configured with Portal successfully

ISSUES
A. When click on My Org -> Edit settings -> Prompted for u/pw for NetworkAnalysisUtilities (services are not protected)
B. There is no default travel mode
C. Unable to configure travel modes

  1. No attributes and parameters, can't save
  2. If I add siteadmin credentials for the service (see A above) there ARE attributes and parameters. Still can't save

D. When try to execute an analysis tool (e.g. Service Area)

  1. Error Unable to access requested url for Utility routingUtilities. Invalid token. CreateDriveTimeAreas failed.
  2. In browser console: invalid tomen 498, Error 000732 supportingFiles: dataset
    DefaultTravelModes.json does not exist or is not supported. (Note - no errors prepping data or creating services)

E. Hosting server logs report - Error: SpatialAnalysisTools (Create Drive Times tool) - job failed unable to access registered URL for utility routingUtilities. invalid token (AO_100149)

NOTES:
I tested NetworkAnalysisUtilities from rest endpoint and did the following:

A. Error @ GetToolInfo - Missing file in \location\data\router...\SDs\0\v101\ndsupportingfiles. Note: [0\v101\ndsupportingfiles] don't exist

  1. I added 0\v101\ndsupportingfiles folders, copied the file from the following location to it, restarted the service. \location...\arcgisserver\directories\arcgissystem\arcgisinput\Routing\NetworkAnalysisUtilities.GPServer\extracted\v101\ndsupportingfiles\DefaultTravelModes.json.
  2. Note: DefaultTravelModes.json is also in the following location: \location...\arcgisserver\directories\arcgissystem\arcgisinput\Routing\NetworkAnalysisUtilities.GPServer\extracted\cd\ndsupportingfiles

B. Error @ GetTravelModes - The file referenced above aren't - though they're there.

Appreciate anything you can offer.

Geoprocessing error when publishing

I am getting a geoprocessing error when I run the "publish routing services" script. It gets as far as trying to create a map service definition then fails - the error message in the log file is:

"ERROR 001272: Analyzer errors were encountered (codes = 147, 147, 147, 147).
Failed to execute (StageService)."

ArcMap results are below.

My service definition folder is sitting outside of the ESMP folder and my active portal url matches with my owning system url so I've ruled out those possibilities.

Any ideas of what I might be doing wrong?

geoprocessingerror

ESMP licensing with Analysis Services

Can someone elaborate on how the licensing/pricing works when publishing the ESMP data to analysis services?

Is a single ESMP license applied to the ArcGIS Server machine where the service will be running, and this then allows unlimited access to the services (e.g. the analysis services, geocoding) from a portals named users without purchasing additional user licenses for ESMP?

I also noticed when reading the technical restrictions on using ESMP:

You also cannot use any ArcGIS function that will read from the Streets or Routing_Streets Shape field and output features into a feature class (for example, buffer, intersect, and so on).

The analysis services create hosted feature services from the HERE data (we are in Asia Pacific, and only have option to use HERE data for Australia) - does this not conflict with the terms of use?

0x80004005: The toolbox did not load

Hi,

we are having the following error trying to publish the network services.

0x80004005: The toolbox did not load

Our environment is ArcGIS Server 10.5.1 HA with the config-store and directories in a shared location. We run the Publish Routing service script and we think the first stage is going well, the .sd files are apparently well generated. After that the process fails in the publishing services stage. For any reason .tbx file and other folders are missing in arcgisserver\directories\arcgissystem\arcgisinput\Routing\NetworkAnalysisUtilities.GPServer\extracted\v101 and also in the other services.

Do you hace any idea on how to resolve this issue?

Thank you in advance.

Cannot publish Network Service

I am trying to publish my custom Network Dataset as a Network Service. However, I receive an error. I have used the following parameters and credentials to run the Publish Routing Service tool:

image

After running, I received this error:

image

Even though both the server machine and ArcGIS Server is running. Please find the log file attached below. Thank you.

PublishRoutingServices.log

creating supporting file issue

I tried to create the network utility service using a custom network service.
but I have the encode error at writing the ".ini" config file in the "Creating Supporting Files" process.

The error message : "UnicodeEncodeError: 'ascii' codec can't encode characters in position 643-647: ordinal not in range(128)"

I tried to encode "value" to "utf-8", but I caught the same error.

Is there any help to resolve this issue?

The routing services publish successfully but fail to execute in certain cases

When running the Publish Routing Services tool, if the value for the Service Definition Folder parameter is in the same folder hierarchy as the value for the Server Data Folder Path parameter, the tool will successfully publish all routing services. But executing routing services will fail with messages that indicate the DefaultTravelModes.json file could not be found.

For example, when running Publish Routing Services tool, if the values for Service Definition Folder is D:\ESMPData\ServiceDefinition and the value for Server Data Folder Path is D:\ESMPData, you will run into this issue.

Until this issue is fixed, as a workaround, make sure that the Service Definition Folder is not contained within the same folder as your ESMP dataset.

Analyze Network Dataset Fails

When trying to execute the Analyze Network Dataset Tool, the following error occurs:
Executing: AnalyzeNetworkDataset "\Coangisd\gis\GIS\ArcGIS\GeoDatabases\Network Dataset\NetworkDataset.gdb\Transportation\Centerlines_ND"
Start Time: Wed May 08 10:29:18 2019
Running script AnalyzeNetworkDataset...

Traceback (most recent call last):
File "", line 349, in execute
File "D:\ArcGIS\Toolboxes\network-analysis-services-2.1\ut.py", line 1473, in init
self.descNDS = arcpy.Describe(network_dataset)
AttributeError: 'module' object has no attribute 'Describe'

Failed to execute (AnalyzeNetworkDataset).
Failed at Wed May 08 10:29:18 2019 (Elapsed Time: 0.00 seconds)

I'm unsure as to where or what this is.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.