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

learn more… | top users | synonyms (7)

0
votes
1answer
11 views

Error in <module> arcpy.SelectLayerByLocation_management

I am writing a Python code and have trouble adding a layer to the program. I face this problem below: Traceback (most recent call last): File "G:\arcpy workspace\python learning codes\loc.py", line ...
3
votes
1answer
30 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 ...
4
votes
1answer
67 views

arcpy, ExportToSVG using paths

I want to export part of the map into (very big) SVG file. First I tried to do this using REST API: https://*server*/ArcGIS/rest/services/General/Etages/MapServer/export. This worked, the SVG file ...
-3
votes
0answers
28 views

can't get tuple to run

I am having some trouble getting my code to run particularly for my tuple: for lake in arcpy.da.SearchCursor(In_Lakes,["OID@","SHAPE@"]): Shore_List = [] for feature in lake[1]: for vertex in ...
2
votes
0answers
16 views

Python with ArcCatalog for Table or Geography view? [on hold]

Is there a way to automate the preview tab in Arc Catalog using Python? Say if I wanted to preview the geography of a feature class where I have the path and just don't really want to connect to the ...
3
votes
0answers
19 views

Automatic point plotting in ArcGIS from thresholded image [on hold]

I would like to know whether it is possible to plot points automatically on a map in ArcGIS by using a raster file as a reference. The image below would represent an example of line that comes from ...
3
votes
2answers
193 views

Duplicating polygons in Layer using ArcPy cursors?

I am trying to Duplicate some polygons in the same layer with the same attributes, But it will duplicated them with Null Geometry, i have tried getValue() method, but i got error import arcpy ...
2
votes
3answers
53 views

Stacking multiple selected points in ArcGIS

I would like to find a way to stack multiple selected points in ArcGIS, either using the field calculator or python script. For example, I want to snap all points representing houses on a street into ...
2
votes
2answers
36 views

Having two input feature layers and derived output feature layer in ArcGIS Python Toolbox tool?

I'm unable to find an example of an ArcGIS Python Toolbox similar to the one I'm trying to get to work. The standalone python script works beautifully. Turning it into a Python Toolbox so I can use ...
2
votes
0answers
28 views

How to get 4 values for different Indexes and names of rasters for set of points? [on hold]

I am trying to get 4 values for different Indexes and names of rasters for set of points, but get problem with defining function def extractIndex(raster, pathName). #List of Folders 4 Folders ...
3
votes
0answers
20 views

Get results for each topology errors for Polyline or Points? [on hold]

When you set up a topology to build topology rules for each polyline, or points, is there a way to get the results or summary for each Line Errors? For example, when you set "Must Not Overlap", ...
2
votes
0answers
27 views

Python Script to apply the Northing and Easting of a photo center .shp file to a tiff. [duplicate]

I have a group of tiffs I want to georeference. I have the photo centers for each of the tiffs but they are not linked. After looking at the comments I believe there would be a way to take the ...
0
votes
1answer
48 views

Getting NameError with PythEveryone in ArcGIS virtual campus module?

I'm working on the python for everyone lab in Esri's Virtual campus. I'm running into an issue that I can't seem to solve, I've already done some outside research hence posting here! The issue: 4th ...
0
votes
1answer
1k views

NameError: name 'Con' is not defined

I have 365 rasters with the same extent, and I am trying to sum them together by month. I have the script below, which was working until I added the line out1 = Con(IsNull(raster), 0, raster) which is ...
1
vote
1answer
420 views

trouble with code block execution in python script

I am trying to calculate values for a field in a python script, but keep getting an error that I don't understand: ExecuteError: ERROR 000539: Error running expression: Fron000000F1 Traceback (most ...
1
vote
1answer
86 views

NumPy Array to Feature Class: NameError from Inner Loop Variables

I have a NumPy Array to FC script that parses a JSON web-service. The outer loop writes to my FC correctly, however my inner loop variables come back as not defined when appending the items. The ...
3
votes
3answers
697 views

Calculate field using variables as fields gives ERROR 000539?

When I calculate a field like this: field_0="field_name0" arcpy.CalculateField_management("Layer", field_0, '!field_name1! / !field_name2!', "PYTHON_9.3") It works! The field "field_name0" in the ...
3
votes
2answers
206 views

Global name "fc' not defined?

First, I'm trying to call a function from a module (final_functions) I created in a separate script. However I receive the following error: Traceback (most recent call last): File ...
3
votes
1answer
2k views

How to copy values from field to another using arcpy?

Can some one please let me know how I can do simple field calculation like Copying From "A" to "B" in ArcPy? I have found lots os example on web which they all used extra expression and they were ...
0
votes
1answer
21 views

Getting NameError when using Cursors to read vertex coordinates in ArcPy? [on hold]

I am new to python and having trouble Looping each feature in the new polygon shapefile, then use geometry cursors to read vertex coordinates of this lake polygon, identify the city that is the ...
1
vote
1answer
2k views

Using a Select By Location in Python and Calculating a field based on what State Plane a point falls in

Here's what I have so far. Do I need to make another feature layer based on the selection? import arcpy arcpy.MakeFeatureLayer_management(r"PATH TO THE POINT", "point_lyr") ...
-1
votes
0answers
25 views

ArcMap Scripting Selecting Points [on hold]

I am trying to run a script that is able to select points from a shape file. But i keep running into an error. What are some suggestions?
1
vote
1answer
23 views

How to make an arcpy tool to take multiple inputs csv/text lists, instead of a single input?

It's been only few days that i've been working in python environment. Based on this code, i've been trying to batch few process for our QAQC task's. At certain times, like when i use ...
-1
votes
0answers
23 views

Confusion over Describe properties? [on hold]

Can someone clarify the meaning of the 'fullPropsRetrieved'and 'metadataRetrieved' properties of a Describe object. In particular my confusion is regarding the definitions provided on the ESRI website ...
1
vote
1answer
193 views

Scripting creation of cogo polylines including curves

Is it possible to create polyline features from cogo type text files? I have some files that have survey type coordinates in them and they contain straight line segments as well as curves (defined by ...
2
votes
1answer
174 views

ReconcileVersions tool yields ERROR 000301

I am wanting to create a version, step into the version, make edits, and then post and reconcile that version. When I get to the ReconcileVersions_management tool, it is giving me ERROR 000301: The ...
1
vote
1answer
41 views

Python Script GetParameterAsText?

I am writing a python script to be added to a toolbox and I do not know how to call an existing tool to be a parameter. import geocoder ##geocoding library import csv import arcpy ...
1
vote
2answers
95 views

Scripting (Python) Feature Class content into Shapefiles following an UTM data structure

Consider a Feature Class and two of its fields are "UTM_grid" and the "OID". Scripting with python 2.7 for ArcGIS 10.3. "UTM_grid" field contains the geographic info (e.g. B1SD40B) and was broken ...
2
votes
1answer
60 views

Select by frequency

I've got a number of shapefiles with some redundant data. I'm looking for a way to select where a single attribute occurs more than a certain number of times (in this case four) and remove them from ...
2
votes
1answer
25 views

Append tool Error “WARNING 000594”

I am trying to migrate a dataset from one fileGDB to another using the Append tool. When running a few features get copied over however the rest get the following error: “WARNING 000594”: Input ...
0
votes
0answers
14 views

How to extract feature class representations of multiple feature_classes from multiple gdb's? [on hold]

We have 100's of gdb's in different folders. Would like to extract the list of feature classes which has "symbology representations" from multiple gdb's. Will it be possbile ? I couldn't able to ...
1
vote
1answer
36 views

How to export list of feature classes in multi gdb's to a csv file?

Using the codes mentioned here How to list feature classes in multiple geodatabases in a folder? i was able to list all the feature_classes in multiple geodatabases within a folder. Problem is i don't ...
1
vote
1answer
31 views

Python Addin - Disable Toolbar in Layout View

I'm trying to disable a toolbar with nested menus and buttons when an mxd is in layout view, but it's not working. I also get no output in the ArcGIS python window when I switch to layout view. ...
2
votes
2answers
22 views

Reference Items in Generated List for Multiple Record Selection and Iterate

I'm new to Python and am having trouble with a list of all things. The data I am currently working with consists of multiple road segments (contained in 'STREETNAME' field) each of which has a ...
1
vote
1answer
30 views

Changing Query Layer's SQL Expression with Python

I use query layers in ArcMap 10.4. The maps need to be done/repeated periodically. The easiest way is to copy the map, change the source's SQL expression (e.g. from select * from TABLE where Period = ...
1
vote
2answers
91 views

Changing single character in attribute table with ArcPy?

I was trying to speed up my data processing, and I was wondering, which would be the python code, that could browse through my shapefiles, and find special single characters (which I define) in ...
5
votes
1answer
71 views

How to add Unique ID number to a list if rows contain a consecutive sequence (Arcpy)

I am trying to use an Arcpy Python code to identify the Unique ID number for streets that contain consecutive addresses and ignore rows that do not. For example: FULLST | LOR | HIR | UID Gate ...
3
votes
1answer
37 views

Calculate visibility with polygonal visual barriers

I have the raster file for my digitial elevation model as well as a polygon shapefile with polygons representing different kinds of environments (forest, field, meadow, etc), and wouldlike to ...
0
votes
0answers
18 views

Extracting projection details for TAB files from multiple folders using arcpy's describe spatial reference?

I am trying to extract projection details of vector files (it might be a tab or shp file) in multiple subfolders using arcpy's describe.SpatialReference. If i run this code, i am getting this error. ...
6
votes
2answers
8k 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 ...
1
vote
1answer
243 views

how to find that two polygon boundaries are connected?

I am working on a Geo database where there is a layer with many polygons. i want to find that which polygons boundaries are connected so that i can create new layer from that polygons and which ...
9
votes
4answers
3k views

Inserting points into SQL Server using pymssql?

I am collecting X and Y values from a web service (Twitter) via a python script. In the long run, this will run over a period of months and I intend on stopping at around the 6 million point mark. ...
1
vote
1answer
473 views

Error in Select Numeric type column in pyodbc with ArcCatalog?

I created a python script that uses "pyodbc" plugin to connect a SQL Server database and write out data. It was imported in an ArcGIS 10.1 tool and run from there. try: arcpy.AddMessage('FLAG 0') ...
1
vote
1answer
33 views

Updating Field to Calculated Variable using Arcpy

I'm trying to use the updateCursor to insert a calculated value in the correct field. However, I keep on receiving an execution error. I think it is an easy fix, but I am new to arcpy and cannot ...
1
vote
2answers
23 views

ArcGIS Server - Can python GP services returns json data to client through REST?

Can python GP services returns json data to client through REST? Imagine I have a python GP service that creates buffers around points and then merge the polygons together. I would like to send the ...
1
vote
1answer
30 views

Iterating a model that contains values too low [on hold]

Beginner Python programmer here, I have exported my Model Builder model from ArcGIS to Python. What I am trying to do is provide some kind of clause saying "if the data selected has less than 2 ...
1
vote
1answer
50 views

(Arcpy) read values from a txt file and convert the data into a shapefile

I´m a beginner at python programming and wanted to start with a litte and hopefully simple project. I tried to read float values out of a textfile and write them into a shapefile. The program is ...
0
votes
1answer
24 views

Create feature datasets from group layer name

Is it possible to create feature dataset, based on the name from group layers. I have two separate codes, one for finding out the names of group layers, and other to create feature datasets. ...
1
vote
2answers
37 views

Creating a subselection with arcpy

I want to do the following: from a point layer's table, 1) grab all GEBID (an attribute) and create a list(1) with unique GEBIDs 2) iterate through the list(1) in a loop:   2a) stuff all features ...
0
votes
1answer
37 views

How to run in background an .exe program withArcGIS?

I am working with the ArcGIS program that reads Python language. For that I've already implement scripts as script tool on the ArcGIS. Now I need to run in background an exe program "gams". Is it ...