A site-package created by Esri to expose GeoProcessing from ArcGIS to Python.

learn more… | top users | synonyms (7)

3
votes
1answer
44 views

Importing arcpy in Spyder

I can't import arcpy in spyder but I don't have any problem when using PyScripter. The error that I get is: ImportError: No module named 'arcpy' I would prefer using Spyder, if I can solve this, any ...
2
votes
1answer
77 views

How to compute zonal statistics fast?

I have 12000 circles with a radius of 50 miles on a raster with 0.05 degree resolution. Global analysis. The raster is 32 bit float and I have to calculate zonal statistics for 20 different rasters. ...
1
vote
1answer
29 views

Arguments error when running LineDensity scripts in arcpy

I'm trying to use LineDensity tool on polyline features. The shapefile is small and includes some invalid geometries. The code I use is an adaptation of an ArcGIS Help script. Here is my code: ...
2
votes
1answer
50 views

Is it possible to append data to existing NetCDF file using ArcGIS or ArcPy?

There is a Raster to NetCDF tool for converting raster to NetCDF using ArcGIS. I need to append raster data as dimension to NetCDF? How to do that using ArcGIS or ArcPy?
3
votes
1answer
40 views

Cannot pass python string outputs as inline variables in modelbuilder

I'm trying to pass a couple of strings from python as parameters in the extract by mask tool in modelbuilder. Unfortunately it doesn't recognize them. When I type them in the parameters it thinks I'm ...
3
votes
1answer
41 views

Remove holes from polygons using geometry objects

I've written a script that should remove holes from polygons with use of cursors and geometry objects. However, holes remain even though I'm constructing new polygons from the vertices from the first ...
2
votes
0answers
51 views

Benchmarking ArcPy / ArcMap Performance on different computers?

This project came out of my need to build a justification for a faster work computer. Before asking for new equipment I want to be prepared to show the increase in performance by adding RAM or more ...
0
votes
1answer
48 views

Extracting channel banks from DEM and channel newtork

Currently I am working in project that require from me extracting channel banks. I have been thinking about the best method that I can use to come up with good function that extract the location of ...
0
votes
0answers
26 views

Python importing Arcinfo to Python 2.7.11 Script

I am having trouble getting an arcinfo license using a python script. When I try to call "import arcinfo", making sure it is my first line of code because of legacy issues, I get the following error ...
1
vote
1answer
25 views

Data Driven Pages ExportToAI Resolution syntax?

I'm fairly novice with code. I am trying to do a simple data driven pages export to .ai using arcpy. I need the resolution down to 150 DPI. Line 4 brings up parsing errSyntax Error: Invalid Syntax. ...
1
vote
1answer
50 views

Can arcpy.MakeXYEventLayer() cope with *xls files in script?

I am trying to create a point FeatureClass from an Excel-File using a standalone python-script. I am applying the method "arcpy.MakeXYEventLayer()" which works fine using *.xlsx files. However, I am ...
1
vote
0answers
32 views

How to display geoprocessing service results in an ArcGIS Online Map?

I am implementing a python script that filters features in a feature service. For this I used the following lines of code: import arcpy # URL with service, where clause and field parameter baseURL= ...
8
votes
3answers
164 views

“Greedy” clipping lines with polygon

I am wishing to clip a set of polylines (black lines in image below) to the outer boundary of a polygon. Any voids within the polygon should be ignored. My ideal output are the dashed yellow lines. ...
1
vote
0answers
28 views

How to transfer SQL variable back into ArcPy script?

I am trying to teach myself to access sql tables from an ArcPy script as part of a larger QC process. I am fairly certain that I have the sql statement correct (it works in SQL Server, albeit ...
0
votes
0answers
19 views

Using numpy.dstack() for merging two 3D arrays but losing spatial reference.

The code is as following: >>> temp = numpy.dstack((spi_negative,spi_positive)) >>> >>> temp.shape (16, 126, 294) >>> out_ras = ...
2
votes
1answer
43 views

How to create polylines from a point Feature Class linking all points using arcpy

I want to create polylines linking a bunch of points. Individual polylines must be created between every point. I started by reading the x & y cords and then created unique pairs as well as all ...
2
votes
3answers
56 views

Calculate line density in multiple overlapping polygons

I am working with two layers. One is polygons (animal locations buffered by 5 km), and the other is polylines (for example, roads). I would like to calculate the line density for each polygon, ...
3
votes
1answer
31 views

Python Addin Wizard Combobox scripting help with zooming to selection

I am coding an addin to allow me to use 3 comboboxes to select specific regions within a state. Once these are all selected in the comboboxes I need a final button to zoom to the selected area, ...
1
vote
0answers
24 views

con statement outputs using arcpy.sa.Con doesn't ignore NoData

In ArcGIS 10.2, using the Con tool, I ran a conditional statement to return RasterA where RasterB value >0. That worked fine. Transferring the code into python, the statement reads something like: ...
1
vote
1answer
18 views

Error 000358 using SelectLayerByAttribut_management using escape characters

I am trying to use arcpy.SelectLayerByAttribut_management using the following code: def filterData(self): self.filterBuilder() arcpy.MakeFeatureLayer_management ...
1
vote
1answer
64 views

Unable to delete folder with shutil.rmtree() with ArcPy?

Unable to delete folder with shutil.rmtree() with arcpy: del mxd delete_path_edit = temp_dir_extended delete_path_forward = '/'.join(delete_path_edit.split('\\')) shutil.rmtree(delete_path_forward) ...
1
vote
1answer
48 views

Arcpy SearchCursor (arcpy.da) - Assign cursor value to variable [closed]

I am trying to use arcpy.da.SearchCursor to get the values of two field for each reach record in the DISTRICT feature class. I need to assign these values from the table to a two variables varRegion ...
0
votes
0answers
27 views

Using ReportLab with Arcpy

I am having some issues creating a geoprocessing service within arcmap using reportlabs pdf toolkit. The script runs fine outside of arcmap, however when i try and run it in arcmap to publish as a ...
2
votes
1answer
34 views

How to control field properties when importing csv to Arc gdb [closed]

I am writing Python code to import csv files with UK postcodes to ArcGIS file gdb. The import works fine, however, text fields in newly created table in gdb have length of 8000 characters. Is there a ...
1
vote
0answers
58 views

Arcpy doesn't recognize spatialite tables after editing with QGIS

I'm working on a project that would like to use spatialite as a go-between for field edits using QGIS/IntramapsRoam and then loading the data to a file geodatabase. The workflow is as follows ...
1
vote
1answer
27 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 ...
1
vote
1answer
50 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
34 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
27 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
54 views

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

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
29 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
57 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 ...
1
vote
1answer
41 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
31 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
19 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
13 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 ...
2
votes
0answers
17 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
88 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
50 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 ...
1
vote
1answer
39 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
39 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 ...
1
vote
1answer
74 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
26 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
54 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
52 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
1answer
42 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
0answers
31 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
53 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
24 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
60 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 ...