Skip to main content
10 votes
Accepted

Using dot notation vs underscores when calling ArcPy functions?

Both are just different names for the same thing. You can see this by using the is operator: arcpy.na.CopyTraversedSourceFeatures is arcpy.CopyTraversedSourceFeatures_na will return: True Which ...
PhilippNagel's user avatar
  • 1,720
5 votes

Service Area (ArcGIS), including slope as a cost

In Network Analyst (NA), there is a concept of cost associated with traversing (that is, going through) a road link (edge). Such cost is calculated based on the direction in which a road link was ...
Alex Tereshenkov's user avatar
5 votes
Accepted

Determining optimum shared school bus route to a single destination from multiple origin points

This looks like a Steiner tree problem. You'll need some programming to solve it. Picture below shows manually improved output of algorithm from networkX: and I think computing "flow" in this network ...
FelixIP's user avatar
  • 23.3k
4 votes
Accepted

Network Analyst breaking ModelBuilder?

The Solve tool has a 'Terminate on solve error' parameter that is checked by default and will stop the script if you encounter an error. Unchecking it will let the script go on if the current analysis ...
GISGe's user avatar
  • 9,684
4 votes
Accepted

I don't want to use the time_of_day parameter in MakeServiceAreaAnalysisLayer, what do I put to miss it?

If you do not wish to enter a value for a parameter, you'd typically pass it an empty string. The time_of_day parameter is the 6th parameter (or so I read from the doc). arcpy.na....
KHibma's user avatar
  • 17k
4 votes
Accepted

OD Cost Matrix does not work from every origin to every destination?

I think it is a network problem. When that happens to me it's usually due to the restrictions settings not allowing a path from an origin to any destination. As a diagnostic tool, try running 1 ...
rachel.passer's user avatar
4 votes

Solve Esri Toolbox produces empty Shapefiles (make route layer)

Your question is a bit unclear. But the expression will not work when you name the variables Punkt_6, then use them like this "NAME = 'Punkt_6'". 'Punkt_6' with the quotes is just a string and not the ...
Bera's user avatar
  • 77.7k
4 votes

Viewing Python code for ArcGIS tool MakeVehicleRoutingProblemLayer

No it is not possible. The Make Vehicle Routing Problem Layer tool is not a python script tool, it is a proprietary closed source binary/compiled tool. You can see at a glance what sort a tool is from ...
user2856's user avatar
  • 69.5k
4 votes

arcpy.da.InsertCursor - Objects cannot be updated outside edit session in ArcMap10.8

Use the arcpy.da.Editor to start and stop editing. https://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-data-access/editor.htm Code samples from esri: import arcpy import os fc = 'Database ...
jbalk's user avatar
  • 7,612
3 votes
Accepted

Calculate Field in ModelBuilder?

I just figured out that is needed to put in quotes the expression, So the correct way is: New_field = "%Name%"
Matt_Geo's user avatar
  • 1,042
3 votes
Accepted

How do I know the IDs of the multiple links that are involved in the shortest distance between any two points in a Network?

You specifically mention Network Dataset in your question so I am assuming you are not using a geometric network. In a geometric network the results of a trace can be shown as a graphic or a ...
Hornbydd's user avatar
  • 44.6k
3 votes
Accepted

Network Analyst's Closest Facility - starting from route-possible road segments

Network Analyst's algorithm finds the closest network location to snap your facilities and incidents, it doesn't check if the location is connected to the rest of the network (in the real world, it ...
GISGe's user avatar
  • 9,684
3 votes
Accepted

Obtaining length of river upstream of points up to next point using ArcGIS Desktop?

RivEX does much if not all of what you are asking. For computing upstream length you would run the appropriate RivEX attribution tool to encode that into the network then transfer the lengths to your ...
Hornbydd's user avatar
  • 44.6k
3 votes
Accepted

Using travel costs ($) as impedance in ArcGIS Network Analyst?

I finally solved this issue with the use of the transfer edges between the walking infrastructure and the Public Transport System. When adding the half of the fee in the on board transfer and half in ...
Rogier's user avatar
  • 123
3 votes

Can ArcGIS Network Analyst solve multiple vehicle routing problem?

Network Analyst extension for ArcGIS has a solver Vehicle Routing Problem (VRP). This solver does have support for multiple vehicles. Look for the Routes class inside the Help page. This network ...
Alex Tereshenkov's user avatar
3 votes

Could not figure out OD cost matrix message

That most probably means your network needs a revision. Firstly you need to make sure snap distance is large enough to capture all your origins. This is basically to create imaginary lines to connect ...
fatih_dur's user avatar
  • 5,013
3 votes
Accepted

Seeking free data to calculate drive time based on traffic / congestion?

I am afraid, there are none. But Esri's Network Analyst supports something called live / historic traffic which can be embedded into a network dataset. You might look for other 3rd party sources of ...
Alex Tereshenkov's user avatar
3 votes

Is it possible to export/copy a network dataset?

You do not say exactly how you are copying the GDB and\or exporting the geodatabase. You should be able to copy the geodatabase and all its contents should come along. If this is a file ...
dark fader's user avatar
  • 1,080
3 votes

Assigning Name to Each Points

It looks like points are stacking up due to duplicate line features or line feature segments. I'd perform a delete identical on your output point feature class, either before or after your cursor. ...
Emil Brundage's user avatar
3 votes
Accepted

Creating Drive Time Polygons In ArcMap?

Consolidating info from the comments -- First you have to create a network dataset based on your street data - see https://desktop.arcgis.com/en/arcmap/latest/extensions/network-analyst/exercise-1-...
SMiller's user avatar
  • 3,726
3 votes
Accepted

Why isn't the option to create a Network Dataset available?

It sounds like you don't have your Network Analyst extension enabled. From the documentation, to enable it: Select Extensions from the Customize menu in ArcMap Check the box next to Network Analyst
user2856's user avatar
  • 69.5k
3 votes
Accepted

Finding route between 2 points based on same attributes using ArcGIS Network Analyst?

As you have one start matching one stop I think you have chosen the wrong sort of analysis, you chose Closest Facility I think you need to be using Route. This will create a line between start and ...
Hornbydd's user avatar
  • 44.6k
3 votes

ArcPy Select Layer by Attribute for Date and Time

You need date at the start of each date and single quotes for its value. You may also need to use 00:00:00 for midnight. Try selecting by attribute in ArcMap first and copying its format. "...
Emil Brundage's user avatar
3 votes

Deleting rows that have the same attribute value

You can make use of the Find Identical tool and a little more Python code if you have an Advanced License (if you don't have an Advanced license, you can still accomplish this, you just need to write ...
KHibma's user avatar
  • 17k
3 votes

Recursive calculations on a river network

Hope is what you are looking for: # function to calculate both h <- function(seg, h0 = 10, n, seg.dist, k, up.dist, output = c("h", "h0")){ ctrl <- c(0, diff(seg)) h <...
gavg712's user avatar
  • 206
2 votes
Accepted

Exporting Network Analyst layer objects (orders, routes, etc) created in Python after solve?

I found the bit of code to access the sublayers within NA layer. OrderSublayer = arcpy.mapping.ListLayers(outNALayer, "Orders")[0] Hope this helps someone with same problem.
MoZed's user avatar
  • 45
2 votes
Accepted

Using ArcPy to populate turn feature class for Network Analyst by reading edge identifiers from separate table?

My solution to this was to not use the InsertCursor to write direct to the turn feature class but instead to write the same geometries to a line feature class first. Then when editing with the ...
PolyGeo's user avatar
  • 65.4k
2 votes
Accepted

Arcpy Network analyst - Perform OD Matrix Cost in loop

You can't copy the OD matrix layer to a lines feature class directly. This OD matrix layer is a group layer, you need to retrieve the lines layer within the group. Try this: arcpy.na.Solve(OD_Layer, "...
GISGe's user avatar
  • 9,684
2 votes

Creating separate lines for all pairs of points from a network

No need to use Closest Facility when you're only routing between two stops. In pseudo code: Calculate Locations for your points feature class (will improve loading times) Make Feature Layer on ...
Paul's user avatar
  • 11.6k
2 votes

Smoothing Service Area Polygons

My issue is that the polygons are very jagged and I'd like to generalize them generalizing is a technique to remove vertices from an original geometry so its expected that specifying an increasingly ...
john gravois's user avatar
  • 5,083

Only top scored, non community-wiki answers of a minimum length are eligible