A site-package created by Esri to expose ArcObjects to Python.

learn more… | top users | synonyms (1)

0
votes
2answers
74 views

Multiprocessing with arcpy and Solar Analyst (spatial analyst)

I need help getting multiprocessing to work with the spatial analyst tool - Solar Analyst. I have tested the multiprocessing bit and it works fine. This sample is passing it a file containing 2 lines ...
1
vote
1answer
43 views

Using a for loop to execute a query in arcpy

I'm trying to provide the breakdown of fire detection for an area by sorting of confidence levels. The dataset has 12 files (one for each month in a year) with fire records which all have a column ...
0
votes
1answer
37 views

Updating field in feature class using ArcPy cursor?

I want to update a field in my feature class. I tried to use a da.SearchCursor (code below) but was quickly reminded that tuples are immutable... I ran the code but it failed with a TypeError: 'tuple' ...
-1
votes
1answer
32 views

How do I create a point buffer?

I have a collection of points. The goal is to create a buffer around each point. The radius maybe different for each point and is based on a series of calculations. Some wells might have 10+ ...
2
votes
2answers
47 views

Clipping raster python script stops abruptly?

I have created a tool in ArcGIS based on a python script that will clip a large raster dataset into smaller tiles based on a fishnet polygon feature class. The script iterates through each feature in ...
2
votes
1answer
34 views

Multiple Ring Buffer in ArcPy Generates Single Ring

I'm running a simple multiple ring buffer using ArcPy. My goal is to generate a multi ring buffer for each pond in my dataset of 50,000. Here's the line of code: ...
0
votes
1answer
12 views

is it possible to export map as png without having the webmap JSON?

I want to export the image of a map from a page that I don't have a map available. In other words I need to call a service where I will provide the definition expression of a feature layer, retrieve ...
3
votes
1answer
42 views

Number of items in a Combo Box

I'm developing a Combo Box for an ArcMap toolbar, that at present simply lists all of the layers that are in the table of contents. However the height of the drop-down menu is very small, and I cannot ...
1
vote
1answer
14 views

Saving each file in for loop gives ERROR 000872?

I am beginner to Python programming. I know, I am asking a really silly question. I am trying to extract DEM for each watershed from a bigger DEM. Therefore, I am using extract by mask. The bigger DEM ...
1
vote
1answer
85 views

Using Zonal Statistics As Table for overlapping polygons in ArcPy?

I'm using ArcGIS 10.2 for Desktop and would like to calculate the population within a specific distance from bus stops. My input layers are: census block (polygon) with population undissolved bus ...
0
votes
1answer
18 views

update cursor datetime if start date greater end date

I have 2 date fields in my feature class. If the start date is greater than the end date, I want to add 24 hours to the end date. I am getting a SetValue error. cursor = arcpy.UpdateCursor("PolyFc") ...
1
vote
1answer
50 views

Python - Projecting different shapefiles in the same folder

I have a few shapefiles in one folder with different coordinate systems but would like to use one of them as a template dataset. Is there a way to use python to filter out the shapefiles already in ...
1
vote
2answers
73 views

Using where clause to query date ranges in ArcPy

I would like to query a feature classes date range. For instance, if there is data within a 2 day range then I would like to print true or do something else. I thought arcpy.Exist would do the job, ...
2
votes
2answers
73 views

Accessing multiple shapefiles in folder using Python and ArcGIS for Desktop?

I have been asked to create a custom script to reproject shapefiles (different projections) from a folder, but can't contain values such as filenames and path names to access them. I have started ...
0
votes
0answers
11 views

How can I create text using Python in ArcMap 10.1

I am using data driven pages to create a map book and I want to create the neighboring labels. Is there a way to create the label with a background? And when there is a NULL value in the attribute ...
0
votes
2answers
69 views

Creating Python script tool?

I have ArcGIS 10.2 for Desktop and I have created code which does the following. Abstracts from 1st row 1st column 10, (1500-10) adds it at the second and then repeats A-=A where A= 1500. I want to ...
0
votes
2answers
62 views

How to change different projections of feature classes in geodatabase to one projection in new geodatabase?

I want to create a script that iterates through feature classes with different projections in a geodatabase and exports them into a new geodatabase, all with the same projections. What I want is to ...
4
votes
2answers
118 views

arcpy.da.SearchCursor ignores the where_clause parameter?

I'm trying to use arcpy.da.SearchCursor to go through records in a feature class stored in a SQL SDE database. I do so through a feature layer (created in arcpy) called "unit_lyr". When I run the ...
0
votes
1answer
38 views

Create Table from Selection

This is a continuation of a problem that was solved earlier this week. The code below performs a select by location and was originally intended to export all feature classes from the SDE database to ...
0
votes
0answers
24 views

Help how to return values from multiple columns to dictionary [migrated]

can anyone help with how to call additional columns to my dict below please? The example works fine for the return of one set of values (column) but I need to return values for 2 columns that are not ...
1
vote
1answer
38 views

Set GPLinearUnit type parameter default based on input spatial reference (Buffer Example)

Within a .pyt python toolbox I'd like to have a parameter of data type GPLinearUnit get a default value based on an input Feature Class (FC). The standard Buffer (Analysis) tool works as a great ...
0
votes
2answers
41 views

SearchCursor doesn't return entire SHAPE field, how do I copy a row containing a SHAPE field?

I imported a shapefile into a feature class using arcpy.CopyFeatures_management(). It works and when I look at the feature class in ArcMap and TOAD, I see all the data and the SHAPE field is populated ...
1
vote
1answer
19 views

How do I expand the .SDE file specified in my current workspace?

I'm storing my database connection in a .SDE file. When I output my feature class names in that database connection, I get the full path to the .SDE file. I want the details, like instance, for the ...
1
vote
1answer
44 views

Viewing pseudo node and dangle nodes using ArcPy?

We know that we require production mapping extension and ARCINFO license to view the pseude node and dangle nodes.We have to see these nodes without these functionality through python scripting,but I ...
1
vote
2answers
113 views

How to populate attribute table with sequential numbers?

Using Python, how can we populate a field in a feature class automatically in increasing order? The user must be able to provide the start number. For example, say he wants to populate values from 51 ...
0
votes
1answer
75 views

Problem with addιtion abstraction in Field Calculator

I want a bit analytical respond for the mistakes I have done in my code cause I am new to programming. I am using ArcGis 10.2. and I must process a field with distances in an attribute table I have. ...
1
vote
1answer
77 views

Using Python add-in wizard with ArcGIS 10.3 for Desktop?

I'd like to create an add-in for ArcMap (ArcGIS 10.3) using Python. Unfortunately, the wizard does not seem to have been updated for 10.3, which is the only version Esri provides for download at ...
1
vote
2answers
45 views

SaveToLayerFile does not properly save symbology

I'm trying to save a symbology from a layer, but any way I try to do it, it just gives me a unsymbolised feature shapefile when I try to add the newly created .lyr file. Anyone have any idea why this ...
0
votes
2answers
36 views

How to use SQL within python in ArcGIS Labels

I'm trying to create labels across a one-to many relationship and have tried a simplified version of this method. My version looks like this: def FindLabel ( [NAME_V2] ): import arcpy ...
2
votes
3answers
65 views

Select by Location and extract features using arcpy

So I'm fairly new to arcpy and have been trying to figure out a relatively simple select by location/extract features to new layer automation in ArcMap. What I am trying to do is select features from ...
5
votes
2answers
148 views

Avoiding Python version confusion when using IDLE with ArcGIS Pro and rest of ArcGIS for Desktop?

I have just started to work with Python 3.4.1 which comes with ArcGIS Pro 1.0.0, on my laptop, which also has Python 2.7.8 which comes with ArcGIS 10.3 for Desktop installed, and I would like to ...
2
votes
4answers
149 views

Using Loop function with arcpy.Exists()?

I have a code snippet using elif that checks if a file exists and continues to check through the letters of the alphabet (for example _A, _B, _C etc). All works fine but I think there must a better ...
4
votes
1answer
83 views

How to write to a single table via Python multiprocessing

A comment in the post Can multiprocessing with arcpy be run in a script tool? got me thinking, as I often need to do exactly this: Just beware of deadlocking situations (two Insert cursors in the ...
0
votes
1answer
26 views

Export DDP to MXD based on Raw_Input?

I am running ArcGIS 10.2.2 Version 10.2.2.3552, using ArcMap. I have searched and haven't found anything on this or if it is even possible. I'm trying to add something to my script that allows the ...
1
vote
1answer
58 views

Using Update Cursor?

I am currently trying to get my update cursor to populate every row in each attribute table for 175 different feature class fields. I have written the script and it is populating the first row but all ...
1
vote
0answers
53 views

Is there PostGIS equivalent to arcpy.sa.Slice() function?

I have an existing system built on an 8.3 PostgreSQL database which uses a ArcGIS - Spatial Analyst for a couple of raster operations. The system is moving to PostgreSQL 9.2 and I'm evaluating if the ...
0
votes
2answers
53 views

Convert jpg raster format to tif format

I have 120 rasters( jpg format ) and i want to convert them to tiff format to folder called "OtherFormat" in env.workspace with arcpy. In my code i try to convert all jpg file I read ...
0
votes
0answers
48 views

Calculating distance from PointGeometry object to polyline in arcpy

I created a PointGeometry object on ARCPY and I'm trying to measure the distance from that point to the closest point on a polyline table.. The PointGeometry object has an easy function for that ...
0
votes
2answers
33 views

Update Multiple Columns within One Update Cursor

Are you able to update several fields within an attribute table at the same item within one Update Cursor command. Code Example: with arcpy.da.UpdateCursor (fc, fields) as cursor: for row in ...
1
vote
1answer
35 views

Iterating through a point layer to create & sum distance rasters

I'm writing an Arcpy program to process data in a layer of several hundred points ('ptsLyr', from file 'ptsFile'), each of which has its own ID ('RecordID') and an associated value, 'radius', that I ...
0
votes
1answer
40 views

Using pymssql to create a table using python ArcMap 10.3

I am using ArcMap 10.3 have a my data in a geodatabase (MS SQL Server Express) and I am trying to write a python script that does a bunch of spatial and non-spatial data manipulation. I need to dump ...
1
vote
1answer
51 views

In ArcPy, How to call specific columns of attribute table?

I'm trying to figure out how to spline specific columns of a shapefile attribute table, but my question is intermediate to this-- how do I select a range of columns, e.g. the 20th column to the ...
1
vote
1answer
38 views

How do I enumerate the messages in arcpy.GetMessages()?

Messages are present in GetMessages() but it's a formatted string. I want to add some of my own newlines and alter the content on a per-message basis. How do I access the individual messages in ...
1
vote
1answer
23 views

Create Multiple Feature Layer and Add to MXD

I am really stuck with this one and cannot seems to get the code to execute. Every time I do so, I get the error: Input Features: Dataset [u'Test1'.....] does not exist or is not supported. My guess ...
4
votes
1answer
113 views

Can multiprocessing with arcpy be run in a script tool?

I have been tinkering around with the multiprocessing module to resolve some processing of data in ArcMap 10.3. I have created a script which works fine if I run it in IDLE. I see all my cores max ...
0
votes
1answer
25 views

Exporting list of tables contained in *.mdb with ArcPy gives Indentation Error?

I'd like to export to excel each of the tables in a .mdb database as separate .xml files. The code works until the last line which gives an unexpected indentation error, and I'm also struggling with ...
0
votes
0answers
110 views

Help with python, import update csv values to feature class fields

I am trying to update a bunch of field values from a csv file where there are existing (incorrect) values in my featureclass. After searching I came across a similar post (Help with Python Update ...
1
vote
1answer
39 views

Concatenating fields while also replacing values within certain stings [closed]

I am trying to use python to concatenate multiple fields in a polygon layer. Specifically, I am attempting to combine the values of four fields into one: EXPCODE = !MATRIX! & !PLANT! & !PCT! ...
0
votes
1answer
71 views

trying to build world file for images based off extent rectangle generated from centroid in python

I have centroids for map images which I would like to georeference quickly and rougly via python script, using arcpy. I know the dimensions of the images, the dpi, scale, rotation and the coordinate ...
1
vote
2answers
34 views

Running Select results in error 000210

I'm trying to run SELECT in order to extract specific features under "CLASS_NAME", but continue getting "ERROR 000210: Cannot create output". I've searched though other questions with the same ...