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

learn more… | top users | synonyms (7)

1
vote
1answer
46 views

updating Z coordinates of points in polylines

I have a polyline feature dataset with Z coordinates. I'd like to change the Z values (e.g.) by adding 10 meters. I am trying the following code, but no changes happen. It seems the code is able to ...
0
votes
2answers
34 views

CellStatistics is not defined error

Code : >>> import arcpy >>> ras1 = arcpy.Raster(r'D:\IMD\test_converted1961.img') >>> ras2 = arcpy.Raster(r'D:\IMD\test_converted1961_fliped_ud1.img') >>> result = ...
3
votes
1answer
130 views

Using Update Cursor, populate field

I am trying to write a script where you preemptively select features and then go to the tool which calls for the feature layer and it populates fields based on certain criteria which I will design of ...
2
votes
2answers
49 views

How to use loop to add georeferenced JPEGs from folder to mxd?

This is my first time using this site and I'm a bit new to ArcPy. I've looked around for a while but couldn't quite find the answer I was looking for. I have many folders with georeferenced topos in ...
2
votes
1answer
85 views

Transfer data from access mdb to personal geodatabase (OLE, Python scripting)

I am very new in Python. And I guess I need to use lots of Python here. I have MS Access 2003-2007 database (mdb format) and personal geodatabase (mdb). I created a tool in Access that imports data ...
4
votes
2answers
122 views

Incorporating several Python script tools into one tool and have user input determine section of script run?

I have a series of script tools created and work well in ArcMap 10.2.2 just fine. These tools generate a series of buffer features from an input feature class. I have these as separate tools each ...
2
votes
1answer
25 views

Error trying to call for raster file in gdb RasterToPolygon [closed]

I'm trying to convert raster to polygon. But I'm running into error. ERROR 000865: Input raster: C:/Juivy//python/python.gdb/test does not exist.. This is what I wrote: import arcpy workspace = ...
0
votes
1answer
38 views

Writing Where Clause for text field in arcpy.SelectLayerByAttribute_management()?

I am having problems writing WhereClause for my program. I am using 10.3 arcmap. My layer comes form a file geodatabase. I have this code: mlayer = arcpy.mapping.ListLayers(mxd, "1415_LGA_SpatJ", ...
1
vote
1answer
51 views

arcpy SearchCursor is creating a comma within a tuple

I am creating a list of tuples of coordinates of a feature class. Feature class is created as such: inFC = arcpy.GetParameterAsText(0) The inFC is a point feature class. I then have the following ...
3
votes
1answer
118 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
102 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
35 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
60 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
64 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
57 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
70 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
59 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
46 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
36 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
59 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
56 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
184 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
33 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
22 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
56 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
77 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
51 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
64 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
21 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
290 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
177 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 ...
1
vote
1answer
27 views

Exporting photo from geodatabase

I have a lot of photos in the geodatabase, I want to export the photos to a file. How do I export the photos from geodatabse? What tools are used?
1
vote
0answers
80 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
41 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
76 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
39 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 ...
2
votes
1answer
59 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
42 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
38 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
84 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
55 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
78 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
44 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
58 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
16 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
25 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
102 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
67 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 ...
2
votes
1answer
52 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 ...