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

learn more… | top users | synonyms (7)

0
votes
1answer
127 views

Importing updated CSV values to feature class fields?

Some time back I had a requirement to develop an automated method (Python) to update field values for a spatial points dataset in an Oracle 11g SDE database (exported to GDB for testing). Im Using Win ...
1
vote
1answer
252 views

Passing two variables into codeblock of Calculate Field tool of ArcGIS Desktop?

I have a script tool that truncates each word in field to 3 characters and outputs the result in a new field: "THIS IS AN EXAMPLE STRING" becomes "THI IS AN EXA STR" import arcpy ...
1
vote
1answer
37 views

Arcpy: copied python snippet does not work?

I am trying to convert XYZ-data to a point feature class. I've done this successfully in ArcMap, however, when I copy the python snippet, I get a RuntimeError. I did make some minor changes to make ...
0
votes
0answers
51 views

ArcGIS/ Arcpy: UpdateCursor with only one feature

System: ArcGIS 10.3 with Python 2.7.8 on Windows7 x86 Background: Build a Python script do get drive times from the Google Maps DistanceMatrix and copy the results to an attribute table. The script ...
2
votes
1answer
194 views

How to use multiprocessing or pool to boost up the performance of ArcPy script

I created some arcpy script which actually runs slow on huge dataset. such as 100000 feature in it. I read from below path that multiprocessing can boost up arcpy script script performance. ...
0
votes
0answers
17 views

Missing Ortho Imagery from ExportToPDF result

I am using the ExportToPDF tool to produce a PDF for printing. One of the layers in the dataframe is an ortho imagery layer. For some reason, all layers are being included in the PDF but the orthos ...
0
votes
1answer
110 views

Debugging syntax error (invalid syntax) from arcpy.SelectLayerByAttribute_management()?

I'm writing a script that will create a list of values from the field "Year_" using search cursor, and then a set() of unique values from the list. I then want to iterate through the set making a main ...
0
votes
0answers
45 views

Generating text boxes using ArcPy?

how can I write a python script to automate text box generation for labeling parcels based on one field in the attribute table? The whole process is identical for each parcel, just the text going into ...
1
vote
1answer
294 views

Using Loop with Raster Calculator in ArcPy?

I am trying to loop through multiple rasters and extract cells that are above 0.1 The code I am trying to use is: import arcpy arcpy.CheckOutExtension('Spatial') ...
2
votes
1answer
124 views

Create list of [X, Y] coordinates within field calculator

Lately i've been working on a script that must calculate a value in ArcGIS field calculator based on all vertex coordinates of a polyline. But i am struggling to create a list of a polylines ...
1
vote
0answers
64 views

Jython and the ArcGIS Java SDK [closed]

Is it possible, or would it be feasible to use a Jython environment to interact with this the ArcObjects SDK for Java? Or would it be better overall to learn the native language of the API? ...
0
votes
1answer
27 views

Error: 000358 Failed to execute (SelectLayerByAttribute) halfway through the script

Its strange that the script would start and work on some data, but then fails more than half way through. Here is the error message and relevant script (error line 229 in bold) line 229, ...
1
vote
3answers
154 views

Filtering polyline features by direction using ArcGIS 10.2 (or ArcPy)

I have a polyline shapefile depicting a real road network. In many parts it has two 100 % overlapping segments in opposite directions, representing the two driving directions (In picture: red ...
1
vote
2answers
52 views

how to export fclist and fccount to csv

i am looking for a method by which i can export fc list and fc count into xls or csv. for example i have 3 featureclass in Scratch.gdb. 1.PaLakh 2.PATest1 3.Point i want all 3 of these ...
1
vote
2answers
953 views

Using arcpy.MakeFeatureLayer_management on Shapefile and Feature Class

The larger goal with this code is to create a temporary polygon based on the calculated coordinates (which it does), then to see if the polygon intersects with the "unobscured_FC". After I run the ...
0
votes
0answers
21 views

Importing a directory as a heirarchy of Group Layers

So I have a directory of shapefiles used to store some spatial data, and I'd like to find a way to export this directory to an mxd such that every folder is replaced as a group layer, but preserving ...
2
votes
2answers
145 views

arcpy license: import arcserver is ignored at 10.3.1

PS C:\> taskkill /F /IM python.exe SUCCESS: The process "python.exe" with PID 14896 has been terminated. PS C:\> python Python 2.7.8 (default, Jun 30 2014, 16:08:48) [MSC v.1500 64 bit (AMD64)] ...
0
votes
2answers
55 views

Can I change the pimary key for feature class comparisons with ArcPy

I'm using ArcPy to compare two feature classes from Esri file geodatabases using the Feature Compare (Data Management) tool. The script itself works very well. However it always uses the OBJECTID to ...
1
vote
1answer
72 views

Type error in arcpy SearchCursor

I'm trying to use arcpy SearchCursor to iterate through an attribute table, and the only fields that I'm interested are line_code, w_min and ang_ataque. This is not running properly because I got the ...
1
vote
1answer
99 views

Replicate 'Clip Output to Graphics Extent' when exporting with arcpy

Sometimes I use the check box 'Clip Output to Graphics Extent' when exporting using the UI. I currently have a largish batch of mxd's that I want to export with this button checked. I am using the ...
2
votes
1answer
44 views

Find and replace text in metadata of feature classes

I have 36 feature classes in individual feature datasets. I need to update a portion of the metadata for all the feature classes. I want to find a string of text in the distribution portion of the ...
2
votes
2answers
186 views

ArcPy Get Value of Field for Selected Record

I am building a script to populate a field in one feature class based on a field in another feature class. First I have a leases layer which is all small polygons. Then I have an index grid layer ...
2
votes
1answer
99 views

Create Fishnet with row iterator (in python) - Number of rows and columns not sufficient?

I have a shapefile that contains over 100 squares of different sizes and I want to divide each of the squares into quarter sections. I've written a short python script to do a row iteration and for ...
8
votes
9answers
3k views

Maximizing the use of CPU

My script is intersecting lines with polygons. It's a long process since there are more than 3000 lines and more than 500000 polygons. I executed from PyScripter: # Import import arcpy import time # ...
0
votes
2answers
149 views

Find minimum in a column of attribute table using python on Field Calculator

I have a column X in attribute table where the values are repeated in some lines. What I need is to make a condition that says: when the values in column X are the same, find the minimum of column Y ...
5
votes
2answers
200 views

How to Convert Map Coordinates to Layout Coordinates in a rotated Dataframe?

I am trying to convert Map X and Y coordinates to corresponding Layout coordinates in a rotated dataframe. The code found in this post works fine, but only for unrotated dataframes. I've also found ...
4
votes
1answer
351 views

Raster Calculator Iteration in ModelBuilder?

I have a large number of rasters and I want to add 1 to each of them (e.g. each raster's values currently range from 0 to 1, and I want to make them range from 1 to 2). I believe ModelBuilder, using ...
3
votes
1answer
32 views

mass update connetion properties in msd

I would like to update the connection property in all .msd in a folder, that already have a certain connection property. The manual process is to right click on the .msd, select "select all", ...
0
votes
2answers
77 views

How to reference shapefile in folder for input to ArcGIS Copy Features python function?

I am trying to write a python script that would allow me to download data and copy it to a file geodatabase. The script currently downloads and extracts a zip folder from a FTP site. Ideally I would ...
2
votes
1answer
152 views

Openning HDF5 satellite images

I want to read and open HDF5 satellite images by python for batch processing.How read and open both image bands and meta data? For batch processing I need to geo-reference and read IR bands. Then ...
0
votes
2answers
221 views

Can I use my SearchCursor in Select by Location

I am trying to select the largest polygon that contains each feature in a feature class but none of the features in another feature class. I have written the code that seems logical to me but (of ...
0
votes
0answers
35 views

Name file based on column information, data driven pages

I am using data driven pages to export 300 maps into PNG-files. I would like to name every exported PNG-file based on information from a column in the attribute table. What is the code for that? The ...
3
votes
1answer
129 views

Labeling each polygon based on the number of points inside it using Python

I have a parcel layer and a trees layer, I want to label each parcel with the number of trees it contains and the sum of DBH. I wrote a script that calculates this and it works stand-alone, but I ...
2
votes
1answer
398 views

How to test for 'if arcpy.exists' with RemoveFeatureClassFromTopology stand-alone script?

I have some datset topologies that i want to loop through, but I need to test for the assignment of feature classes so the scripts dont fail. (Using Win 7, ArcGIS 10.2, Python 2.7.5 and a file GDB) ...
2
votes
0answers
134 views

How to add a separator to an ArcGIS python add-in menu?

In several places (e.g. Making separator and button menu in customized Toolbar using ArcObjects?) I have seen it mentioned that the way to add a separator for add-in menus and toolbars is adding the ...
0
votes
1answer
36 views

Debugging ERROR 000967 from standalone script?

The following script is working in the Python window of ArcMap but not standalone in the PythonWin IDE: import arcpy from arcpy import env env.workspace = r"J:\Non_RS_MXDs\LongHaul.gdb" ...
0
votes
1answer
30 views

Update multi fields in multi shape files with arcpy

I have 3 shapefiles belongs to one state "District", "Mandal", "Village". These three shapefiles have the same fields like DName, MName, VName. I want to update all field in all shapefiles at a ...
4
votes
1answer
867 views

Objects in this class cannot be updated outside an edit session inside ArcFM?

I'm trying to add a feature class in ArcMap 10.2.1 that is an ArcFM Feature Class by using a python script. I am working inside an ArcFM session which is required to edit the layer I am working with, ...
0
votes
4answers
116 views

arcpy.Exists and else statement

This code will go to WATERLINES.gdb, go through the gdb to see if the fc exist (based on a wildcard query), then add the fc to the mxd as desired. My questions is if the fc doesn't exist, the "else" ...
0
votes
1answer
94 views

Adding feature class to TOC using ArcPy? [duplicate]

This question has been asked multiple times with proper answers: How to add feature class to MXD with ArcPy (Python)? Adding shapefile or feature class as layer in ArcGIS Desktop using Python/ArcPy? ...
2
votes
1answer
113 views

Using Search Cursor to calculate fields with records having a specific value

I'm a total beginner at programming and Python. I'm trying to select features by attributes and then field calculate in another field. In VBA it might look like this: If [Z1COMM] = "R" then ...
1
vote
1answer
169 views

Group attribute tables values for use with conditionals - Python

I would like to group values in a field in an attribute table. The field contains duplicate values. These duplicate values should be grouped based on duplicate values, the field would look something ...
2
votes
0answers
29 views

Programmatically change the template of the layout [duplicate]

Is there a way to change the layout with arcpy? Here are images of the steps I want to do programmatically. The file I want to choose already exists and I want to hardcode its path in the ...
1
vote
2answers
128 views

Changing units of buffer

Desktop 10.3.1 GCS: WGS 1984 Created a Buffer of points based on a pre-specified radius from the points attribute table. It appears all of the buffers were created with a decimal degree unit of ...
0
votes
0answers
48 views

dwg to esri geodatabase conversion

I have a lot of .dwg files stashed in various directories. When I look at them in ArcCatalog, they all have point, polygon, polyline, annotation and multipatch layers. Now I convert all of these dwg ...
3
votes
1answer
282 views

Extracting border between contiguous polygons using ArcGIS for Desktop?

I have a shapefile with polygons representing unique populations. I want to determine contiguous polygons in my shapefile, and then extract the border separating contiguous polygons as a separate ...
0
votes
0answers
53 views

Setting units for arcpy fishnet tool, given unprojected input

I'm trying to use arcpy to create a grid over each of a large number of metropolitan areas across the US. I'm iterating over each metro and trying to create a grid over each one using the "fishnet" ...
0
votes
1answer
149 views

NumPy is missing, but fixing the environment variable removed my printer settings?

I recently installed regular Python on my workstation in addition to ArcGIS 10.2. Based on various things I found online, it seemed like the consensus was to install the full Python, because there are ...
0
votes
0answers
52 views

Same script works in ArcMap Python window and fails when executed on different computer?

I have a simple python window script: mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd)[0] sr = df.spatialReference ...
1
vote
1answer
76 views

Struggling with in_memory to erase faster

I want to delete all points inside a polygon layer: import arcpy import time arcpy.env.workspace = r"E:\DensityMaps\DensityMapsTest1.gdb" arcpy.env.overwriteOutput = True start_time = time.time() ...