A site-package created by Esri to expose ArcGIS for Desktop (and ArcGIS Pro) geoprocessing, mapping, etc, to Python.

learn more… | top users | synonyms (8)

1
vote
1answer
52 views

Selecting specific featureclasses in result list of arcpy.da.Walk()?

I am a complete (!) novice in Python. I have a list of access DB (MDB) that each have 1 or 2 featureclasses that i have to select example : B:\map1\DB1.mdb\Feature1 B:\map1\DB1.mdb\...
2
votes
1answer
68 views

ArcPy Python Script To Update Shapefile Records From CSVs

I am fairly new to python scripting. Most of the basics I have down however still learning. I am trying to create a python script to update a shapefile with information from two separate CSV files. ...
3
votes
2answers
46 views

Simplifying a feature class to feature class ETL using multiple input feature classes with varied schemas

I'm wondering if anyone can help me brainstorm how to simplify this ETL process? The way I have it written, it just feels very repetitive, but I can't think of a way to avoid the repetition. I'll ...
0
votes
0answers
65 views

Using arcpy.CopyRaster_management function convert raster to 64-bit raster?

I am writing a Python script tool that takes a raster as an input parameter. I want to use this input to create a constant raster that is saved to an output geodatabase (which is another parameter). ...
3
votes
1answer
106 views

How to check if a feature class is being used in MXD? [closed]

Trying to remove any unused feature classes contained throughout multiple geodatabases. Want to check and see if each feature class is being used in an MXD. Is there any tool/script/methodology to ...
0
votes
1answer
65 views

Distinguishing between invalid raster files and valid ones at using arcpy functions

I am trying to move raster files from one location to another. By using the function: ListRasters (arcpy), I can get the list of rasters to be moved, but the problem is that even corrupted rasters ...
2
votes
1answer
86 views

Arcpy Code result- “NaN”

When i run this code (in arcView 10.3) in order to check the data frame extent, i received "NaN NaN" result with the exact data frame. I don't understand why python print this out? I checked in http://...
1
vote
1answer
54 views

How to to get current legend column count using arcpy?

I can change the numbers of columns in the legend using arcpy.adjustColumnCount(column_count). However, in my particular case I would like to know how many colums there are in the legend in the ...
0
votes
0answers
96 views

Extend line to specific distance or a line

I want to extend my polyline to a given distance. How can I do this. I have attached image to clear my specification. I am using .net in ArcMap . I am also using python in the image, I want to ...
0
votes
1answer
22 views

ShapeFile To GeoDatabase Conversion error

I wrote this python code and when i run it nothing happened and it's success import arcpy # Set environment settings arcpy.env.workspace = 'C:/ShapeFile' # Set local variables inFeatures = ['...
0
votes
0answers
20 views

Automatic update of ArcGIS Runtime Content

My company has developed an app for IOS that can show geographic information mostly directed towards utility companies. In one of the applications I have made an offline search-function that searches ...
3
votes
1answer
45 views

ArcPy to Enable Database for use with Data Reviewer

Has anyone ever used ArcPy to Enable Data Reviewer? By this I mean add the necessary feature dataset and tables to an existing geodatabase in order for it to be considered a Reviewer workspace and ...
1
vote
1answer
112 views

Trying to increment a field value for only the repeated records in a feature class using Python

NOTE: If you look at the excel tables just above the comment section it will give a clearer picture of what I want to achieve in my code. So the code below works in doing what I want it to do thus ...
4
votes
1answer
83 views

Can the field mapping be shortened in ArcToolbox tools?

I have converted a model to python in ArcGIS 10.3, and have found that the tool outputs a full and very very long field mapping. Is there a way to shorten this somehow? While I want all field names/...
2
votes
1answer
69 views

Removing Interior and exterior polygons using arcpy

I have a polygon layer that has donuts and also exterior parts. Using python, I am able to get access to each part, but what I would like to know is using arcpy, once I have a part, how do I go about ...
1
vote
0answers
72 views

Using row.setValue() function with arcgisscripting?

I'm trying to set column value NULL. I tried different ways to do that, I used CalculateField_management and UpdateCursor but i did not get success. when i used CalculateField_management. It says ...
3
votes
1answer
482 views

Selecting rows in a layer using arcpy.SearchCursor

I'm working on a project to identify points that fall along lengths of road. The roads are stored a single featureclass within a file geodatabase, as are the points. I'm using ArcGIS 10.3. I'm trying ...
0
votes
1answer
35 views

UpdateCursor based on results from SearchCursor

i'm kinda stuck with an UpdateCursor. This is what I'm trying to do: each cell of a grid stores multiple answers that were given in a survey. For each cell I must choose only ONE answer, the one that ...
0
votes
1answer
61 views

Calculating several cells into one cell in same table using ArcPy

I'm very new to Python and scripting in ArcGIS. I need to calculate some cells from one field in table into another one cell in another field in same table. Here's what i need: Here's what i try ...
0
votes
0answers
88 views

Merging selected features in one DBF table (polygons) using ArcPy?

Im absolutely new to Python and programming. How can i merge selected features in one DBF table (polygons) using Python in ArcGIS 10.2 for Desktop? Here's what i need: Here's what i've got: ...
1
vote
2answers
208 views

Extracting multiple Subdataset from hdf files to geotiff format using ArcPy?

I have 165 hdf files(monthly data) of EVI(Enhanced Vegetation Index) , I need to convert them to a geotiff format. In ArcMap 10.1 I can only extract the data one file at a time. I have this python ...
0
votes
2answers
72 views

What data type is excel in Arcgis Add Script wizard?

When creating tool from a python script in ArcGIS, data type has to be chosen in Add Script wizard and one of my parameters is Excel and another one specific sheet whereas there can be more sheets in ...
1
vote
1answer
147 views

Arcpy search cursor and update cursor to write values from table A to table B

I'm a python beginner. I`m working with ArcGIS 10.2.2 and IDLE Python 2.7.5 I have two tables, table A (top) and table B. I need to read the attributes for the A-table fields for the selected ...
0
votes
1answer
48 views

ReconcileVersions and “out_log”

I'm automating some sde geodatabase management. In the ReconcileVersions_management function there is an option create a log file of the result ("reconcileLog"). If the script runs five nights a ...
3
votes
1answer
67 views

Calculating one cell from dbf table to another cell in same table using ArcPy?

Am absolutely new to python programming for ArcGIS. How do I calculate one cell from one field in DBF table into another cell in another field in same table? Here is what I've got that doesn't ...
4
votes
1answer
58 views

Is it possible to locate a specific marker point on a raster using python and use that location for georeferencing

I have several scans of the same map, which I would like to georeference. I can not use arcpy.WarpFromFile_management(...) as the rasters are slightly different due to scanning. Is there a ...
2
votes
1answer
242 views

Counting number of pixels/cells with particular value in raster using ArcPy?

I have a raster image containing values ranging from 1 to 10 in Integer format. I want to count the number of pixel with value = 1. Is there any method in Arcpy which returns the pixel count if ...
2
votes
1answer
215 views

Converting mxd to earlier version using ArcPy?

I am running arcmap 10.2.2 but need to open an mxd saved using 10.3. I do not have access to 10.3. I have an arcpy tool which will do the conversion but it is not working from within 10.2.2. Does ...
-1
votes
1answer
89 views

Filtering the raster type in the arcpy.ListRasters() function

After having read the Help file of the arcpy function: ListRasters(), I cannot find a better way of filtering the raster type than adding some extra python coding. In detail, I have several files ...
1
vote
1answer
31 views

Debugging error 000865 in Python script tool for use with raster elevations?

I'm trying to create a python script tool that will take in a DEM/raster as a parameter, pull out the maximum and minimum elevation values, and iterate through this range of values at a specified ...
6
votes
0answers
158 views

How do I get layers' IDs using python?

I am working in an ArcMap session, I've checked the option to get an ID for each of the layers in my document, so anyone has it. Now, what I need is a way to get these values within a python script ...
1
vote
1answer
111 views

arcpy.PackageWorkspace doesn't keep reference to SDE enterprise geodatabase

I am publishing a geoprocessing service on ArcGIS Server v10.3.0 that updates data on an ArcSDE Enterprise Geodatabase. I have the following at the beginning of my script: arcpy.env.workspace = "...
1
vote
1answer
65 views

how to save a raster after converted from numpy array?

I'm trying to save a raster after calculation in numpy array. Here is what I wrote: rasterSM = arcpy.NumPyArrayToRaster(SM, lowerLeft, cellSize, value_to_nodata=nodata) rasterSM2 = arcpy....
4
votes
2answers
164 views

how to get max and min from a raster using arcpy?

I have a land surface temperature raster file and I want the max and min of it. minLSTresult = arcpy.GetRasterProperties_management(raster_result, "MINIMUM") minLST = minLSTresult.getOutput(0) ...
4
votes
4answers
193 views

Swapping Lat and Lon coordinates of shapefile?

I have a shapefile that consists of one polygon whose boundary is defined by a large number of points. Whoever originally made the file inverted the latitude and longitude coordinates, so the data ...
4
votes
1answer
73 views

Error saving object from python script using GetParameterAsText

I have a script that takes in a line, and creates a certain polygon based on this. My code obtaining the input information is as follows: inFC = arcpy.GetParameterAsText(0) hasClearway = arcpy....
1
vote
1answer
150 views

Batch convert dgn files to separate shapefiles in ArcGIS

Actually, currently we are doing dgn -> shp file conversion using ogr2ogr. Batch convert dgn files to shp files using ogr2ogr The problem is, at times the point layer is not getting read properly &...
0
votes
0answers
42 views

Multiprocessing - Point Solar Radiation

I need help getting to work with point solar radiation and multiprocessing. I want to calculate solar radiation with all values from list (transmittivity, diffuse_Prop) by for loop. import arcpy, ...
3
votes
1answer
69 views

Skipping Non-spatial Data in For Loop

I'm working in ArcMap 10.3, and I have a script that searches through all the folder and files in a directory using arcpy.da.Walk, grabs any file containing a key word, and copies it over to new a gdb ...
2
votes
1answer
103 views

Python script outputs polygon feature class with no shape_area or shape_length and therefore doesn't show up in arcmap

I am trying to copy features a number of times based on a numeric field value. The code below works for points when the POINT type is chosen. However, when I switched the feature type to POLYGON it ...
2
votes
1answer
56 views

Convert searchcursor object to variable

Using a python script, i would like to read through a table which features 27 columns. For each row i want to store the value of each column in a variable, so that i can pass the values to a ...
3
votes
0answers
67 views

matplotlib show() suspends ArcGIS

I've written a python script to plot a cross-section from a DEM along a line. Everything works fine except when I Show the plot, ArcGIS hangs and I have to force it to close with Task Manager. I ...
0
votes
1answer
84 views

How to update annotations from fields values to annotations objects

I have annotations feature class and need to update some field offset and alignment values When I edits them manually at attributes table in ArcMap, new values applies to objects and they changes ...
1
vote
2answers
65 views

Update Cursor keeps Crashing and Skipping

I use a 3rd party software that exports the name of JPEG as I collect points, in this case street signs. I know the names stay static and are all unique but different features may have the same JPEG (...
3
votes
1answer
42 views

Changing draw text element to be right to left using ArcPy?

I'm trying to produce a set of maps in certain locations using Data Driven Pages. I'm using a script written in python that generates a dynamic table in each sheet. The table has attributes of all the ...
1
vote
0answers
69 views

Creating Flooding depth Rasters at every feet

I am explaining the issue I am facing to automate the process. I have created a DEM from LIDAR and the Asset elevation is incorporated into the surface. Purpose of this task: Once I get the new ...
0
votes
0answers
15 views

Using ArcPy to insert Excel table into ArcMap Layout View? [duplicate]

I have been using python to batch automate maps and I have been using a manually drawn table on the layout view and have been using the ArcPy text elements to replace text with the values for each map....
6
votes
2answers
159 views

Changing grid interval using ArcPy?

I work with ArcGIS 10.3 (Python 2.7.8) and I need to change the grid interval in 70 MXD's. I tried to find Python code that can do it. Currently, the interval in each MXD is 200 meters and I need to ...