Questions tagged [walk]
Use for questions about traversing folder/directory structures
30 questions
0
votes
1
answer
281
views
Getting feature datasets with arcpy.da.Walk
I am using ArcGIS Pro 3.1.0.
I'm trying to find feature datasets in file geodatabase (possibly many geodatabases, but for clarity here only one) using arcpy.da.Walk. I'm aware of workaround using ...
0
votes
1
answer
138
views
Task Scheduler run arcpy.da.Walk correctly
I have a task in Task Scheduler (Windows Server 2016 Standard) that runs a simple .bat file calling python.exe and my python file. One of the first things my .py file does is use arcpy.da.Walk to ...
1
vote
0
answers
62
views
arcpy.da.Walk can not get feature class in dataset with Chinese in path (could reoccurrence bug)
2023.02.27 edit. I know how fix it now, but would like to know why so that I can change my module.
I used to use this function to iterate all feature classes, but it has a problem with path with ...
0
votes
1
answer
611
views
Looping through Excel files and deleting the same column for each
import csv
import os
import pandas as pd
#This nested for loop iterates through my excel files and then appends them to my list.
feature_classes = []
for dirpath, dirnames, datatypes in arcpy.da.Walk(...
2
votes
1
answer
427
views
Deleting feature based on attribute using arcpy.da.Walk on file geodatabase
I'm very new to scripting and am having trouble figuring out how to use da.Walk to delete features based on attributes for my entire geodatabase. I got the script below to work on an individual ...
2
votes
1
answer
819
views
"Raster map not found" error using GRASS r.walk
I'm using GRASS' r.walk for the first time, and I'm trying calculate the best path between two different points. I have a DEM (from SRTM) and a slope map derived from that same DEM. Both are in the ...
1
vote
1
answer
420
views
Loop through directories and mosaic all raster TIFFs in each dir
I have 200+ directories, each directory contains x amount of TIFFs which I want to mosaic.
I have a snip of code that will list the TIFF contents of all dirs under a parent directory, now I just need ...
2
votes
1
answer
399
views
For loop for access to a directory files in ArcPy
I have a Python Toolbox and I want to use a directory to read different shapefiles. But when I run the script It only works for the first shape.
fd is the directory and the code is:
fd= parameters[0]....
5
votes
2
answers
3k
views
Get feature class names inside ESRI File Geodatabase
I have a project folder with many many folders within that. Some of these child folders contain an ESRI File Geodatabase(s). I want to list all the feature classes that are inside the GDBs that have ...
1
vote
1
answer
33
views
Saving outputs from arcpy.da.Walk to the same folder
I have a number of sub-directories within my "BP Tiles" directory. Each of these sub-directories represents a different year (2016, 2017, 2018, etc.) and within each of these sub-directories is a list ...
3
votes
1
answer
347
views
Describing element in geodatabase using ArcPy
With help from people on this site, I have the following code to look for all of the element types in the geodatabase and put them into a report.
walk = arcpy.da.Walk(workspace, topdown=True)
for ...
2
votes
2
answers
2k
views
Walk function in Arcpy
I posted a similar question before, but I am trying to list all of the element types in the geodatabase, such as feature datasets, networks, rasters, domains, non-spatial tables, etc.
For rasters, I ...
2
votes
1
answer
88
views
Running Python code for ArcMap?
I want to use this Python script to check my D: for .mxd's and list them in a CSV, as I want to find which MXD is using a particular file, and this would help.
I don't know where to put the file path ...
0
votes
1
answer
361
views
Arcpy iteration in folder for all shp equivalent
I want to write a scrpit that automatize the process of clip and project (in one GCS) to many .shp in folders and subfolders (row downloaded data), with 2 different GCS (CH1903+ or Lambert93).
For ...
2
votes
3
answers
2k
views
Mosaic to new raster on rasters with the same name in different locations
I have national woody vegetation raster files for Australia for years between 1988-2017. These files are separated into spatial tiles with the same name. So, what I would like to do is combine raster ...
1
vote
1
answer
3k
views
Adding Layers file to MXD using ArcPy
I tried to add several layer files to MXD file. when i run this code no error rise- but only one layer file added to the MXD and all the other 34 layer files in the workspace aren't added to the map. ...
2
votes
1
answer
2k
views
OSRM: no walking directions
I am using the OSRM 'match' service to snap GPS coordinates to the road network. I want to use the 'foot' profile, however, the OSRM server insists on providing me with car routing.
I send this ...
0
votes
2
answers
2k
views
Merging all feature classes with same name nested in multiple geodatabases using ArcPy?
I am using arcpy and I want to extract a specific feature class called "building" nested in a number of geodatabase within my workspace.
Here is the code:
import arcpy
import os
workspace = "C:/...
0
votes
1
answer
307
views
I'd like to see where commercial districts are, using color-coding. Is there any free map website, other than Google Maps, which can help me? [closed]
Background
Google Maps nowadays shows "areas of interest" in pale orange. (Source.) As far as I can tell, "areas of interest" are basically just high-density commercial districts.
I think it makes ...
1
vote
2
answers
215
views
Loading multiple shapefiles with different names, from +1000 subfolders
I'm looking to add a large number of point files into an .mxd from a huge group of multi-layer folders. The script from Loading multiple shapefiles from +1000 subfolders worked with some tweaks, but ...
2
votes
1
answer
1k
views
Looping main and Sub-folder in ArcPy [closed]
I am writing a Python script, which can literate through all main folder and Subfolder. My main folder names are 2001, 2002.....and under main folder differents subfolder is there, Subfolder name : ...
0
votes
1
answer
219
views
Recommendations for a fre OSM based walking tour mobile app? [closed]
I am working with a small municipality with a very small (read:no) budget. They would like to build a walking tour for mobile use based around natural features, and some history but mostly nature ...
1
vote
1
answer
1k
views
Using arcpy.da.Walk to go through many file geodatabases
I have several file geodatabases I've downloaded from a content provider. A subset of them, which I'm filtering by a couple of strings, have 1 feature dataset within (containing many feature classes) ...
2
votes
3
answers
716
views
Optimizing arcpy.da.Walk performance?
I'm trying to automate a workflow that currently costs a co-worker about 45 minutes. General run down is this person copies files from a network drive onto a local one, and process it through four ...
2
votes
1
answer
95
views
Optimized walk lists for door-to-door traversal of a region
Given a region in a city, I'd like to make a list of all the street addresses it contains in an order which is reasonably efficient for a person to traverse on foot. Ideally, I'd like the solution to ...
2
votes
1
answer
2k
views
Using ArcGIS Online to calculate walking times from points? [closed]
I am currently planning an accessibility analysis for the recycling infrastructure in my city (waste collecting points) and I want to determine the walking time from each point so that I could seek ...
1
vote
1
answer
74
views
Specific Feature Copying
I'm trying to write a script to copy multiple feature classes from two different databases into a single database, but I want to be able to specity what features I actually want. I know I need to use ...
4
votes
2
answers
1k
views
Getting arcpy.da.walk to continue walking after encountering corrupt/problem file
I am relatively new to python. I am trying to iterate through all DWG polylines in a directory with multiple (hundreds) of subdirectories. I would like the code to skip any DWG files that it cannot do ...
2
votes
3
answers
1k
views
Creating a simulation of how people moving around a site
I am working on a project aiming to create a geographic simulation for how people interact around a site.
Situation: There are x people in an enclosed area (such as a zoo). There are y locations to ...
1
vote
1
answer
212
views
Filtering out Annotation Feature Classes using arcpy.da.Walk()?
Is there a way to use:
for dirpath, dirnames, filenames in arcpy.da.Walk():
to filter out annotation feature classes?
The help doesn't specify them as a type, which is strange because using the ...