|
POST
|
This definitely looks strange. Your code looks fine to me. What I can't determine from your screenshot is whether there are edges in your network underneath that zig-zaggy purple line. Are there? Or is the line just completely different from the underlying features in the network? In other words, is the purple route following SOME kind of streets, or is it just generating a wacky geometry that has nothing to do with the underlying network? Since I really have no idea what might be causing this, here are some questions and things to check that might lead somewhere: Does your travel mode (any of the ones you've used) have a simplification tolerance set, and what is it? Is your network dataset built? Have you edited the geometry or settings since the last time you built it? (The General page on the network dataset properties will tell you if it's built.) Are you 100% sure that the route you created using the Pro UI was using the same network that your script is using? Did you accidentally use ArcGIS Online as the network data source for the layer in the UI? If you call export() in your script to export the output route to a feature class, does it still look strange? Maybe the problem is in the insertCursor. This definitely seems like a strange issue, and if none of these questions lead anywhere, you might be best served by calling Esri Support or Support for the distributor in your country. They can look at your workflow in detail and try to identify the problem.
... View more
06-11-2024
09:30 AM
|
1
|
1
|
1438
|
|
POST
|
Yes, if you were able to successfully create and build a network with your edited template, then this should be sufficient to resolve the problem.
... View more
06-10-2024
08:02 AM
|
0
|
0
|
632
|
|
POST
|
By the way, this was an extremely strange issue! I'm sorry you encountered it, but it's certainly not something we had ever thought to test. You found a very interesting challenge for our team.
... View more
06-07-2024
07:01 AM
|
1
|
0
|
3179
|
|
POST
|
Sure. The ultimate cause of the issue was creating the network dataset from a template in which the ID values of the network attributes are out of order. If you open the network dataset template, you'll see something like this in the XML: If those ID numbers are out of order, you'll encounter the problem. And, for some complicated and weird reason, the problem only occurs if you create and build the network in a model. Our bug fix just makes the software ignore those ID numbers since they aren't important anyway. To avoid or work around this problem in pre-3.4 software, you have two choices: Don't use a model to create and build your network. If you run the Create Network Dataset From Template and Build Network tools manually, it seems to work fine. Manually edit the ID numbers for the EvaluatedNetworkAttribute items in the network dataset template. Usually we don't recommend users to manually edit these templates since they aren't documented or intended for direct interaction, but in this case it seems like a reasonable workaround. I think in our message exchange you had mentioned that you also resolved the problem by creating a new template from the messed-up network you created, and that subsequent networks created from the updated template worked fine. If that's the case, then this would be a valid third option.
... View more
06-07-2024
07:00 AM
|
1
|
3
|
3179
|
|
POST
|
The HERE NAVSTREETS version of the Street Data Processing Tools is now available for ArcGIS Pro at https://github.com/Esri/street-data-processing-tools.
... View more
06-05-2024
09:59 AM
|
1
|
0
|
1498
|
|
POST
|
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 more
06-04-2024
12:28 PM
|
1
|
0
|
1183
|
|
POST
|
Yeah, you can't create a network dataset layer with a URL. You can just use the URL directly: arcpy.na.MakeClosestFacilityAnalysisLayer("https://myportal.mydomain.com/portal/") or arcpy.nax.ClosetFacility("https://myportal.mydomain.com/portal/")
... View more
06-04-2024
12:26 PM
|
0
|
2
|
3460
|
|
POST
|
It's interesting that you're not getting an errors here. If the exported Routes sublayer is empty, then I would suspect that the solve is failing, but that would throw an arcpy.executeError. Try printing out the GP messages after calling arcpy.na.Solve(). arcpy.GetMessages() will return all messages returned by the tool. Maybe there are some warnings that will explain what's going on. With that said, if a Python script or process is your ultimate goal, there's a better way to do it than using Make*Layer, Add Locations, Solve in a script. That workflow works great in the UI, but for Python, there is a much faster and more Pythonic way to code up a network analysis workflow using the arcpy.nax solver objects. This documentation explains the process: https://pro.arcgis.com/en/pro-app/latest/arcpy/network-analyst/performing-network-analysis.htm. This documentation is for the ClosestFacility object: https://pro.arcgis.com/en/pro-app/latest/arcpy/network-analyst/closestfacility.htm. I recommend just switching over your code to use this instead, and maybe your problem will go away. Another thing you can try (with your existing script or with new code using the arcpy.nax solver objects) is to write the code to use the local Streetmap Premium network dataset and be sure it works. Once that's working, you should be able to switch the network data source to use the URL to your portal service, and it should just work (provided the portal is signed in). If it works with local Streetmap Premium and then doesn't work with the portal, then something is wrong with the portal configuration or the log-in.
... View more
06-04-2024
07:55 AM
|
0
|
8
|
3474
|
|
POST
|
Hmm, you might have to experiment with a few things. I don't think you can change the Shape field name of an existing feature class, but maybe you can create a new feature class and then append the rows to it from the old one. Or maybe use Export Features and fix the Shape field name in the field mappings. Another option is to open up the XML template and change "!Shape!" to "!Geom!", but those templates are complicated and not really intended to be edited manually.
... View more
06-03-2024
07:18 AM
|
0
|
0
|
2194
|
|
POST
|
Sometimes if you create or update folders while Pro is open, it doesn't notice the changes automatically. Try clicking the refresh button on the dialog. Does your folder appear?
... View more
05-31-2024
12:28 PM
|
0
|
0
|
1716
|
|
POST
|
I think the error message gives a clue: [Attribute: Length, Source: TF_Streets, Evaluator: Field, Field: Shape] Check the Shape field in the Streets feature class. Is it called "Shape", or did it get some other name for some reason? This could happen if you exported or copied data from a shapefile or some other feature class with a non-default Shape field name. The template is expecting the field name to be "Shape". Let me know if this seems to be the problem, and if so, we can figure out how to get around it.
... View more
05-31-2024
08:27 AM
|
0
|
0
|
2220
|
|
POST
|
This is a very reasonable request, but unfortunately it's not possible with out-of-the-box tools to determine which mode of transit was used in the analysis. It's a limitation of the Network Analyst architecture. However, to get around this limitation, you can run a post-process using the Copy Traversed Source Features With Transit tool in the downloadable Transit Network Analysis Tools toolbox. See https://github.com/Esri/public-transit-tools/blob/master/transit-network-analysis-tools/UsersGuide.md#copy-traversed-source-features-with-transit for a description of this tool. The tool includes the RunID in the output, and you can use this field to join the various transit data model tables to get the transit mode. You can download that toolbox from the GitHub site linked above or from ArcGIS.com at http://www.arcgis.com/home/item.html?id=23cc1b720eb0418db4d0e61955b8fe43.
... View more
05-28-2024
07:39 AM
|
1
|
0
|
1115
|
|
POST
|
Thank you Francisco. I have been communicating with @EspenFredrikGudevang via private messages for more details on this issue, but I agree with your conclusion that the problem is with Build Network. Using the network he sent me from the model output, I see the swapped time and distance when I examine a street using Explore Network or when solving a route. This means that the bug is not in the solvers or in Explore Network, but rather the Build Network process has somehow mixed up these two attributes. Doing a full rebuild of the network using 3.2.2 or 3.3 fixes the network. The next step in investigating the problem is to find a workflow (via Model Builder or whatever) that reproduces the problem. Hopefully you can share the model with us. Go ahead and escalate your case to Esri, Inc. Support. It will come to me anyway, but through official channels.
... View more
05-23-2024
07:09 AM
|
0
|
1
|
3284
|
|
POST
|
The key is that you need two fields, not one. The field values represent the "level" of each endpoint of the feature. For instance, let's suppose you have an overpass and underpass with endpoints at the location where they cross (four features total with eight endpoints). Because your data is 2D, it looks something like this: But really, it's an underpass/overpass situation, and you don't want the roads to connect where they intersect. To do that, you need to add fields like F_ZLEV and T_ZLEV and assign them different elevation values to ensure that they don't connect. For example, set the overpass values to 0 and everything else to 0. The hardest part is figuring out whether to set F_ZLEV or T_ZLEV to 1 because the correct field to use depends on the direction of digitization of the street feature. The F_ZLEV field describes the level of the "from" endpoint (the starting point of the feature), and the T_ZLEV field describes the level of the "to" endpoint (where the feature ends).
... View more
05-22-2024
02:02 PM
|
1
|
1
|
3099
|
|
POST
|
Hello Yigal. We don't currently offer this functionality, unfortunately. You can solve for the optimal route and then use barriers to block key parts of that route and solve a second time to get an alternative that avoids the barriers, but this tends to be rather imperfect and hard to do. If this functionality is important to you, please repost this to the ArcGIS Ideas site as an enhancement request: https://community.esri.com/t5/arcgis-network-analyst-ideas/idb-p/arcgis-network-analyst-ideas Enhancement requests posted in ArcGIS Ideas are tracked differently on our end than questions here, and it also gives other users the option to upvote the idea. Alternatively, you can log your enhancement request with Esri Support or Support for the distributor in your country. When you post your idea or call Support, please add as much detail about your use case as you can. Explain why you need alternate routes, what the goal of your analysis is, etc.
... View more
05-21-2024
09:33 AM
|
1
|
0
|
2145
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-12-2026 01:53 PM | |
| 1 | 04-21-2026 08:39 AM | |
| 1 | 04-15-2026 02:24 PM | |
| 1 | 02-03-2026 11:41 AM | |
| 1 | 03-16-2026 08:58 AM |
| Online Status |
Offline
|
| Date Last Visited |
9 hours ago
|