|
POST
|
Hello Luis and anyone else reading this thread who might be doing similar workflows. (Luis, did you ever resolve your problem?) Esri’s Network Analyst Team is doing some research about customer workflows involving solving routes or calculating travel times and distances between known or preassigned pairs of origins and destinations. It sounds like that's what you're doing here! We’d like to better understand our customers’ needs in this area and may use this information to design and develop improved tools and workflows. If you have a few minutes and are willing, could you please fill out the attached survey and return it to the e-mail address included inside the document? Alternatively, you can reach out to me (my e-mail address is in the document) to set up a meeting. Thank you so much!!
... View more
04-04-2023
02:28 PM
|
1
|
2
|
5232
|
|
POST
|
I think the problem is that when you call load() for your orders, you need to configure field mapping to ensure that the locations you calculated with Calculate Locations are actually used. Here is some documentation that might be useful, including code samples: https://pro.arcgis.com/en/pro-app/latest/arcpy/network-analyst/setting-analysis-inputs.htm#ESRI_SECTION2_7E253BC12E0C439E874232D0FD534FED I noticed in the call to CalculateLocations, you've applied a search query to the "GreeceRoadNetwork" source, but that source is set to NONE in search_criteria, so the query will not be used. This isn't really a problem. Just wanted to call your attention to it in case this isn't what you intended. vrp.searchSources=searchQuery The problem could be in there, but I can't see in your script what the value of the searchQuery variable is.
... View more
03-31-2023
11:13 AM
|
0
|
2
|
2359
|
|
POST
|
Happy to help with that. I can't tell from my post whether you're using an OD Cost Matrix layer in Pro or using the arcpy.nax solver objects. The arcpy.nax solver objects have some performance and memory management improvements that are not available with layers, so this is generally a better way to solve very large problems. You can also get some speed improvements by using a network dataset in a mobile geodatabase instead of a file geodatabase. You can convert an unlicensed file geodatabase network dataset to mobile geodatabase using the Create Mobile Map Package tool and extracting the resulting package. The easiest way to solve your very large problem might be to download our parallel OD cost matrix tool here: https://github.com/Esri/large-network-analysis-tools There are also some resources included from past presentations at DevSummit that show some techniques to use to reduce the problem size.
... View more
03-29-2023
04:47 PM
|
1
|
0
|
2686
|
|
POST
|
Interesting. I don't know either, but I'm glad you're able to get your work done. If you have the time and are interested, I would still greatly appreciate it if you are willing to test my special tool version using the old data that was causing the problem, just to see if my changes fix the problem. Several users have run into this!
... View more
03-29-2023
08:15 AM
|
0
|
0
|
791
|
|
POST
|
Hello Philip. Shaun asked me to weigh in here because I work on the arcpy.nax solver classes. I'd like to try to help you with your issue with the OriginDestinationCostMatrix class that's preventing you from upgrading to newer software. To my knowledge, we did not make any breaking changes between 2.8 and 2.9, unless you were inadvertently relying on some undocumented behavior or a bug we fixed. Older scripts should continue working in newer software, at least, that is our goal. Could you please give me some more details about the specific nature of your issue? Hopefully I can advise on how to fix it without your having to rewrite the whole thing using ClosestFacility.
... View more
03-16-2023
02:51 PM
|
0
|
0
|
2236
|
|
POST
|
If you're using an OD Cost Matrix layer, you can use the Add Field To Analysis Layer tool to add fields to the Origins and Destinations sublayers suitable for storying your ID. When you run Add Locations to load your inputs, you can map your ID field to these new fields in the sublayers. When you solve, you can do a join between the Lines sublayer and Origins or Destinations. The OriginID field in Lines corresponds to the ObjectID field in Origins, and the DestinationID field corresponds to the ObjectID field in Destinations. This should allow you to transfer the fields in whatever way you need. If you're using the arcpy.nax solver objects, the procedure is similar but depends on how you're loading inputs. This is documented here: https://pro.arcgis.com/en/pro-app/latest/arcpy/network-analyst/setting-analysis-inputs.htm#ESRI_SECTION1_74EEA24F902D4ECB9C994A7A615C229F The schemas for the output classes and the relationships between them are described here: https://pro.arcgis.com/en/pro-app/latest/arcpy/network-analyst/origindestinationcostmatrix-output-data-types.htm
... View more
03-16-2023
08:10 AM
|
0
|
1
|
2663
|
|
POST
|
The results should be reliable. I don't think the problem is related to the names of the bus stops or any of the values within the fields in the data. I think it's related to the input and output filepaths for the analysis. So, as long as the tool succeeds in reading and writing the files, the analysis should be fine. With that said, I still haven't succeeded in reproducing the problem, so I don't really know what's causing it or how to fix it. I have created a version of the tools where I have attempted to fix the problem, although since I can't reproduce it, I don't actually know if this will work. If you have the time, would you be willing to try it? Please use the same set-up you currently have that cause the tool to fail, but use the updated version of the tool. You can download it from this GitHub branch: https://github.com/Esri/public-transit-tools/tree/fix-encoding. (If you're not familiar with GitHub, you can download the files as a zip file: Be sure to close and reopen ArcGIS Pro before trying the new tool version. Otherwise, the code will be cached, and Pro won't use the new version.
... View more
03-13-2023
08:43 AM
|
0
|
2
|
4188
|
|
POST
|
I'm not sure what's causing that problem, and I'm afraid editing is a little outside my area of expertise. This documentation page might be moderately helpful or might help lead you to the correct information: https://pro.arcgis.com/en/pro-app/latest/help/editing/manage-editability.htm If you can't figure it out, I suggest you either call Esri Support or post a fresh topic here: https://community.esri.com/t5/arcgis-pro-questions/bd-p/arcgis-pro-questions. This post is already marked as resolved and is about something else entirely, so it would be better to post a fresh topic in a location more likely to be seen by someone with the right knowledge.
... View more
03-10-2023
07:43 AM
|
0
|
0
|
1420
|
|
POST
|
Are you running ArcGIS Pro 3.0.0? That looks like an issue that was fixed in the 3.0.1 patch, so you should update your software.
... View more
03-09-2023
09:45 AM
|
0
|
0
|
6777
|
|
POST
|
Hello. As explained above, each network analysis layer produces its own feature dataset and feature classes with a randomly generated unique name. If you need to figure out which feature dataset or feature class goes with which layer, you can check the Source tab of the layer properties. In Python, if you need access to the sublayer, you can use arcpy.na.GetNASublayer(), and you can get its catalog path using the .dataSource property of the sublayer object.
... View more
03-09-2023
09:09 AM
|
0
|
0
|
1471
|
|
POST
|
To answer your specific question: No, you cannot modify network dataset properties in Python. We don't have an API for that. But, I think there may be a couple of better option for you to solve this problem. If I've understood correctly, it seems like you need to be able to vary the numerical value associated with each mode based on product and month. For example, Ferro_Novo (Along) is calculated using [some number] * [the length of the feature]. You are looking for a way to programmatically vary those numbers. Is this correct? I think you may be able to solve this problem using attribute parameters. Here is some documentation explaining what this is: https://pro.arcgis.com/en/pro-app/latest/help/analysis/networks/use-parameters-with-network-attributes.htm I suggest that you create one attribute that just returns the shape length in the desired units (using a Field Script evaluator). Then, create a second attribute for the cost you're calculating. Create attribute parameters for each of the numerical factors you need (not all 60 values you want...just one per unique factor that will serve as a variable that you will need to change). Use a Function evaluator for each edge source that multiplies the shape attribute (the simple one I suggested you create) by the appropriate parameter to scale the value. You can then set up a travel mode for each of your 60 combinations, or, alternatively, you can dynamically create the travel modes in a Python script for running your analysis. You can just update the attribute parameters according to the needs of the specific analysis. Here's the documentation for the TravelMode object in Python: https://pro.arcgis.com/en/pro-app/latest/arcpy/network-analyst/travelmode-nax.htm So, to summarize you will have something like this: Cost attribute 1: Length Evaluators use "Field Script" and are based on the [Shape] field Cost attribute 2: MyParameterizedCost Evaluators use "Function". They are a function of [some attribute parameter] * Length Create an attribute parameter for your scale factor. Let's say you have three different ones based on modes, ScaleA, ScaleB, and ScaleC. Create each of these parameters and give them some default value (doesn't matter what). Let's say 1, 2, and 3 So, the function evaluator for Ferro_Novo (Along) might look like ScaleA * Length. Travel mode: MyParameterizedTravelMode Create a travel mode that uses MyParameterizedCost as the impedance attribute Set the attribute parameter values to some specific values according to your desired scale factors for whatever this travel mode is intended to model (one of your 60 combinations) Then, either create 59 more travel modes, or use Python to dynamically create them from the base travel mode and just vary the attribute parameter values. I think that will work. Your other option (more what you were asking for) is to modify the network dataset XML template, but I don't recommend this, and the schema of that XML is not documented.
... View more
03-08-2023
10:07 AM
|
2
|
1
|
2508
|
|
POST
|
Ughghghgh, sorry! Several people have reported this problem to me, and I haven't been able to reproduce it, so I can't figure out how to fix it. It definitely has something to do with non-ascii characters in your data paths, scratch folder path, or something like that. If you have accent marks, umlauts, or other special characters in your filepaths, I suggest you change the names and see if that solves the problem. If you have some time and want to help me resolve this issue, it would be great if you could tell me the following: What is your Windows OS display language? (US English, German, etc.) What is your Windows locale? (Open the Region & Language settings by typing "Run" on the Windows menu and typing intl.cpl. At the top it should say "Format: <something>" Mine says "Format: English (United States)" What are the various data paths you're using for your input and output data? What special characters do they have in them? Thanks. Hope this helps, and sorry for the trouble.
... View more
03-08-2023
09:48 AM
|
0
|
4
|
4207
|
|
POST
|
I don't completely understand your situation, but I'll try to answer your question. You will get a warning like "No "Destinations" found for "Location 59" in "Origins"." for each origin where no destinations were found within the cutoff. If at least one destination was found for that origin, you won't get that warning for that origin. The "Partial solution found" message will occur if at least one origin found no destinations within the cutoff. From your pictures, it seems like your network and analysis configuration is working correctly. If your goal is to find which origins found no destinations you can join the output Lines sublayer back to the Origins sublayer (the OriginID field in Lines corresponds to the ObjectID field in Origins) to transfer some field like Total_TravelTime (or whatever, for your network - doesn't really matter). The rows with null values for this joined field are the origins that didn't find a destination. (This seems more reliable than trying to parse the warning messages, if that's what you're trying to do.)
... View more
03-07-2023
08:49 AM
|
1
|
0
|
3393
|
|
POST
|
If your streets are already in a network dataset, then certain special behavior kicks in when you edit them that will help maintain network connectivity. This includes correctly updating the Z-level fields in the child features of a split feature. However, if the network dataset isn't created yet and you're just editing an ordinary feature class, these rules will not apply. You can read about the special editing behavior for features participating in a network here: https://pro.arcgis.com/en/pro-app/latest/help/analysis/networks/network-dataset-street-editing.htm As far as splitting all your features at once, using one of the standard editing tools is your best bet since that will ensure that the special network behavior occurs. This page might give you what you need: https://pro.arcgis.com/en/pro-app/latest/help/editing/clip-features-using-another-feature.htm
... View more
03-07-2023
08:37 AM
|
0
|
0
|
1314
|
|
POST
|
Hello. Probably E1 and E2 are not connected because there is neither an endpoint nor a vertex at the location where E2's endpoint intersects with E1. Any Vertex connectivity will not work if there is no vertex at that location. You can add vertices at the locations of all intersections by running the Integrate tool with a 0 XY tolerance. (Be careful because that tool alters the input data - you might want to make a backup copy first. Another thing to watch out for is if you overpasses and underpasses or other situations where you don't want the roads to connect at intersection points.) You will need to use Any Vertex connectivity for this configuration since the features will not be split at intersections but will simply have vertices.
... View more
03-06-2023
07:47 AM
|
0
|
1
|
2178
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Monday | |
| 1 | 2 weeks ago | |
| 1 | 2 weeks ago | |
| 1 | 06-12-2026 01:53 PM | |
| 1 | 04-21-2026 08:39 AM |
| Online Status |
Offline
|
| Date Last Visited |
Monday
|