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

learn more… | top users | synonyms (1)

0
votes
0answers
19 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
78 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
91 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
125 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
46 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 ...
1
vote
1answer
49 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
50 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
52 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
131 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
77 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
128 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
50 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
47 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
81 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
200 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
161 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
108 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
34 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
70 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
58 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
69 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
52 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
47 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
42 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
67 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
59 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
42 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
28 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
142 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
43 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 ...
1
vote
1answer
44 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
76 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
37 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 ...
0
votes
2answers
44 views

Arcpy reclassify label display issue

I have been looking for about 2 days and I can't seem to figure out or find a work around for the symbology labels after a reclassify when trying to automate maps. I run the following code and it is ...
0
votes
1answer
51 views

Alter Fields in multiple feature classes in multiple workspaces

I have 22 geodatabases all in one folder. Each gdb has two feature classes. For each feature class, I need to rename a few of the fields. I've had success with this code, but it only works for each ...
3
votes
0answers
38 views

Automate Exporting of Rasters Using Renderer in ArcGIS

It is possible to export rasters in ArcMap by right clicking the layer-> Data-> Export: You can then click 'Use Renderer' check box to ensure the image you export uses the current ...
1
vote
2answers
85 views

Referencing layer in Table of Contents using ArcPy?

I'm looking for the best way to reference a layer in the TOC using arcpy and, if it is possible, that is different than the following: mxd = arcpy.mapping.MapDocument("CURRENT") df = ...
0
votes
2answers
48 views

Exporting gdb tables to excel in folder containing gdb?

So i have several folders which each contain a gdb. Now, I export the attribute tables of polygon feature classes using the following code (probably could use some optimization): folder = ...
0
votes
0answers
30 views

Failed to execute (ExtractByMask)

I use ExtractByMask of arcpy to isolate to subset the provinces of the Philippines. I do it with this code. import arcpy from arcpy import env from arcpy.sa import * ...
3
votes
2answers
579 views

Running Python script in Task Scheduler— Script will not run

I have a script which I wish to run on a regular monthly basis without me needing to open and run the it. I have referred to every web page I can find on Windows Task Scheduler and followed their ...
2
votes
1answer
110 views

Python encoding error in ArcPy

I am writing a JSON file, as string input, using python, into a .json file in the file system. However I am getting the following error sometimes and I don't know why. Any ideas? ...
0
votes
1answer
43 views

Arcpy.Buffer_Analysis Does Not Create Feature Class

import arcpy arcpy.env.workspace = r'c:\data' fcs = str(raw_input('Please enter the layers you would like to buffer: ')) dist = str(raw_input('What would you like your buffer distance to be? ')) ...
0
votes
0answers
155 views

ImportError: DLL load failed: %1 is not a valid Win32 application

In my system python 26 is installed for arcgis10.0 and python 27 for 64bit is installed. Both are working fine individually. Now, i want to import arcpy from python window, but failed. Now the error ...
4
votes
1answer
112 views

Reclassification of raster

Is there a better way to do this? I'm trying to create a script that will change classifications of a raster to: 0 for: 0,7-9,15-20,40,62-63,73,78-87,89-130,132-151,153-175,177-203,215,228,251-253 ...
0
votes
1answer
64 views

Geodatabase affecting outcome

Why does my naming convention change depending on where the output is saved? When I save this to a .gdb, the name of the output is "tif", not final_mosaic.tif. When I save the same output to a ...
1
vote
1answer
23 views

Clipping a Raster into 5x5(25) equal tiles through the use of arcpy?

I am curious to find our if there is a way to create a python code that enables you to clip a raster into equal parts example: 5x5(25) tiles with the use of arcpy? From what I can think of you would ...
0
votes
0answers
24 views

How do I lookup a value in a list?

I have a list of points populated with a da.SearchCursor. This list is used to lookup additional values from the next step. This would be akin to SQL join. listOfPoints= [] with ...
0
votes
1answer
67 views

ArcPy Script to update LYR data source not identifying all layers in folder

I've put together a script that for the most part works as intended - to walk through a series of folders, find SDE layer files and update their data source to direct connects if the layers support ...
2
votes
1answer
33 views

ClipRaster with three inputs

1) How can I clip raster with checked "Use Input Features for Clipping Geometry? I don't want to specify X, Y Min/Max for the Output Extent. I want to run a simple Clip Raster script that includes 3 ...