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

learn more… | top users | synonyms (7)

3
votes
1answer
70 views

Using ArcPy to export individual mxds from data driven pages?

I'm trying to generate individual mxds for each page in my data driven pages (which I have set up already). I have 38 pages in total, so I would need to generate 38 mxds. The pages are named according ...
3
votes
0answers
31 views

Why does my Validation Script continue to run when adding the result to the map?

I am in the process of developing a python script that creates a list available imagery for our project areas that would then allow the user to choose which imagery source they would like to add to a ...
1
vote
1answer
217 views

Arcpy getCount_Management doesn't match row count with Cursor

I have some troubles to understand the behaviour of my code below. Obviously, GetCount_Management doesn't match the rows in my layer selection. This code is part of a long for loop. I have hidden the ...
2
votes
3answers
95 views

How to calculate Statistics of an attribute field to use it in another calculation

I want the statistics of an attribute field to use in another calculation, i can view the statistics using the field properties menu I want these to normalised the data of field 'Ia' using the ...
1
vote
1answer
57 views

How can I create custom projected coordinate system in arcpy?

I want to create my own projected coordinate system based on one of geographical coordinate systems and set custom values to properties as longitude, scaleFactor etc. I found SpatialReference class. ...
0
votes
0answers
16 views

How to ApplySymbologyFromLayer but autogenerate unique color?

I am trying to write a script that will allow me to change all the layers within a selected group layer to a particular symbology. For example, we often want to change our point data to all display ...
0
votes
1answer
86 views

Using python and ArcPy to read multiple files, apply a function and write into new a directry

I haven't used python yet; I want to read multiple GeoTiff files and resample them based on another single file, and be able to write all the files in a new directory. I can use R raster package to ...
1
vote
1answer
40 views

Problem replicating ArcGIS Grouping Analysis 'grouping effectiveness' statistic results

I posted this question over on Esri's GeoNet, but have not yet gotten an answer. Using ArcGIS v10.2.1, I have been using the Grouping Analysis tool to generate a range of clusters from my data. I ...
2
votes
1answer
33 views

Calculating the area of groups based on intersect of several shapefiles using ArcPy?

I have 5 shapefiles. There are 72 possible groups of 'land cover+top-rock+subrock+soil drainge' in each watershed. I want to get the area of the different groups of 'land cover+top-rock+subrock+soil ...
1
vote
1answer
20 views

Create Separate Layers by Category

I'm trying to create a layer for each county (based on a layer of all counties) and join only those census tracts located in that county. However, the result I'm getting is a layer named for each ...
0
votes
1answer
29 views

Arcpy - (Error 999999) Table Already Exists Project Management

My code is supposed to clip features within a temporary directory, project them and place them into a specific feature dataset within a geodatabase. Then the code goes back and deletes the temporary ...
4
votes
1answer
69 views

Importing MXD to ArcGIS Pro programmatically?

I have a problem with importing an MXD file to ArcGIS Pro programatically. I try to do this by using the following arcpy.mp code: import arcpy aprx = arcpy.mp.ArcGISProject(r"C:\test\blank.aprx") ...
0
votes
0answers
66 views

Same script runs in python window fails in script tool

I have this snipplet, in which I'm triing to use. If I run it in the python window in ArcMap it runs correctly, but when I'm using it as a script tool, it fails without error message. This script ...
0
votes
1answer
41 views

How to show 100K results of a complex query on map without using graphics

I need to show all 100K points on the map without using any sort of clustering. Since they are too much they cannot be shown using a graphics layer. since they are result of a very complex Oracle ...
0
votes
1answer
97 views

Using search cursor with ArcPy and Spyder?

I recently installed ArcGIS 10.3.1 (previously had 10.1 installed) and I am trying to run a script in Spyder 2.7 that has always worked and getting the below error: "Traceback (most recent call ...
0
votes
1answer
85 views

Using function in SQL query with ArcPy?

I am trying to join points to polygons based on whether their addresses match as well as if the distance between them is less than 2500 feet. I defined a haversine function that computes the distance ...
1
vote
1answer
33 views

Empty feature classes made when trying to split by attribute

I am working with a Basic license of ArcMap 10.3, and I am trying to split a feature class into multiple feature classes in a geodatabase by unique values of an attribute. More specifically, I have a ...
1
vote
1answer
33 views

Installing Pythonwin for use with ArcPy?

I have ArcGIS 10.0 And installed pythonwin 2.6.5 When wrote a script in Python Shell - it works just fine But in pythonwin - i get import arcpy error as below >>> import arcpy Traceback ...
2
votes
1answer
59 views

Select Data won't work… Parameters are not valid in ArcGIS ModelBuilder?

I'm creating a model in the ArcGIS 10.3 ModelBuilder and have problems to get the select data tool to work. At first the complete model: IHS-Klassifizierung With the Select Data tool (Input Data ...
1
vote
1answer
62 views

Using arcpy to create a layer from business analyst dataset

I'm trying to automate several of our processes using Python in ArcGIS for Desktop 10.3. At least one of these tasks involves running a query against block group data provided by Business Analyst ...
2
votes
0answers
96 views

How to speed up my script? [closed]

I am looking for the way to speed up my script. It is working fine, I mean, the final output is as required, but it is clunky and really slow. It is slow because of the double 'for..in..' loops, I ...
0
votes
0answers
10 views

Using predefined variables in whereclause? [duplicate]

Can't seem to figure out how to use variables for an SQL whereclause in python. e.g. want to select_analysis(layer, "new sel", field = attribute) with field and attribute being predefined by user ...
0
votes
0answers
36 views

Using Calculate Value tool in ModelBuilder to ignore/skip rasters without features/data? [duplicate]

I'm trying to use the calculate tool to skip rasters in a model. I don't know very much python and can not fix the errors I encounter. When the model runs rasters will be run through a raster ...
1
vote
1answer
62 views

arcpy and ArcGIS Pro: update Z values of a pointMZ geometry

I am trying to "reverse" the values of Z in a pointMZ geometry with arcpy.da.UpdateCursor. Anyway, I am not able to find a way to achieve this, although my script seems to work (no errors, printing ...
1
vote
1answer
104 views

Open popup dialog window on button click in Python AddIn?

I'm trying to figure out a way to display an image in a dialog box that will be used for a help menu for my toolbar addins. The best scenario i've found is using the pythonaddins module and the ...
0
votes
2answers
53 views

How to get the specified point coordinates of a Polyline

lines_cursor = arcpy.da.UpdateCursor(lines,["From_id","To_id","SHAPE@"]) for lines_row in lines_cursor: from_id = lines_row[0] to_id = lines_row[1] if from_id in points_dict.keys(): ...
0
votes
1answer
55 views

Add mxd path to csv by Python

I'm trying to write a python script that adds to a csv file the date, time and mxd path. I tried to run the script from the Python IDLE without the mxd path and I succeeded to add the date and the ...
1
vote
1answer
69 views

Export PDF from a folder having multiple single mxd and mxd's having data driven pages

I have folder having multiple single mxd and mxd's having data driven pages. I am trying to get the pdf's of each of these MXD's.if mxd's has a data driven pages then all the pages from a same mxd ...
0
votes
0answers
12 views

Converting RGB values from CSV to ArcMap Save As Layer File? [duplicate]

I would like to Convert RGB values from a CSV to a ArcMAP save as a layer file. I have a csv file with 4 columns. First column shows Depth in feet and second, third, Fourth column shows that RGB ...
2
votes
1answer
50 views

Trying to understand updateCursor() for python

I am using ArcMap 10.2.2. I am attempting to write a script that will cycle through the classes in a database and change the attribution of 1 row. Is my variable "lyr" being recognized as the classes ...
1
vote
1answer
65 views

Selecting group layer using arcpy.GetParameterAsText()?

I have a script that allows me apply a single SQL Definition Query to all feature classes within a particular Group Layer. For ease of input for others in the office, I changed this into a model ...
0
votes
1answer
38 views

Adding file geodatabases as group layers?

I have a couple hundred file geodatabases (GDBs) each containing several feature classes. Is there a way for me to move the GDBs into an mxd such that each GDB is imported as a group layer ...
1
vote
1answer
230 views

Increase python script speed [closed]

for row1 in cursor1: if row1[0] != None: num3=row1[0].upper() custx=row1[4] custy=row1[5] num2=row1[8] try: ...
0
votes
1answer
28 views

Where Clause looking at two Columns and a RANGE Expression

Using ArcPy I'm Trying to Set up a Where Clause with a RANGE in my "FeatureClassToFeatureClass_conversion" This {Where Clause} needs to Query Two Columns in the data: FEATURE = 'ENVIRONMENT' and ...
0
votes
2answers
48 views

Drawing map from XY coordinates in CSV and exporting it to JPEG using ArcPy?

I have a csv file containing about 40,000 rows of data with X, Y (longitude and latitude) data. It is US data, and I have downloaded a state.shp file on which the X, Y points can overlay. I am able ...
1
vote
2answers
68 views

Alternative to nested Con statements in python

I have a nested con statement that I'd like to put into a script, as it's hard to follow in its current form. The raster it produces is incorrect, so it'd be easier to debug in a script. The ...
0
votes
1answer
90 views

How to set parameter dependencies in ArcGIS python toolboxes

I'm trying to build a python-toolbox where the user selects a layer and then specifies a column in that layer. According to the documentation, that is done via the parameterDependencies attribute of ...
0
votes
1answer
56 views

Copying content from one Portal for ArcGIS to another using Python?

I am trying to copy content from one portal to another with python only, without using AGO assistant https://ago-assistant.esri.com/, as this doesn't work behind our firewall in our test network. I ...
0
votes
1answer
19 views

Divide broken line layer in seperate clusters based on location

Building on a earlier asked question on this forum I would like to ask an additional question in getting the task done I asked here: Divide polyline layer in clusters with specific requirements in ...
1
vote
1answer
23 views

Querying two Separate Columns in ArcPy SQL {where clause}? [duplicate]

Using ArcPy I'm Trying to Set up a Where Clause in my "FeatureClassToFeatureClass_conversion" This {Where Clause} needs to Query Two Columns in the data: FEATURE = 'ENVIRONMENT' and TEMPERATURE ...
1
vote
1answer
83 views

convert dbf file to txt file using arcpy

I have a series of dBase files and I'd like to convert them to text files Anyone can help me? I've tried table to table, doesn't seem to work. The idea is to get ASCII files so I can do further ...
1
vote
1answer
39 views

How to write a python code for Add Feature Class To Terrain using interface?

I am trying to write a code that creates a Terrain from lidar data (LAS). The problem is that the inputs are in Feature Dataset in GDB but I don't know how to write code so that using an interface. I ...
0
votes
0answers
15 views

Creating Bookmarks in Map Document (*.mxd) using ArcPy? [duplicate]

I've poked about the internet pretty deeply this afternoon for this one and i would seem that there is not a way to write / save a bookmark using Python in ArcGIS Desktop. I see how one can read the ...
0
votes
0answers
39 views

Problem with arcpy.MakeFeatureLayer_managament running in script

I am exporting pdf maps using data driven pages based on radial buffers around multiple location, one map per buffer. In some cases, there are overlapping buffers that need to be turned off based on ...
5
votes
2answers
170 views

Data Driven Pages with Movable Legend/Inset Map

I have created a script tool for ArcMap 10.3.1 that will move a legend around a data frame so as not to obscure a specified map layer when using data driven pages. However, I'm encountering an ...
0
votes
1answer
61 views

ArcPy Dissolve Statistics Fields

While running a Dissolve, when using statistics fields, I keep getting an error that the parameters are not valid. Here is my code: toBeDissolved = ...
1
vote
1answer
101 views

From featureclass (or shp) to WKT e GeoJSON

I use ArcGIS 10.1 without Data Interoperability extension and I want to convert some feature classes (point, lines and polygons) contained in an .mdb. I read some posts but can't convert my file. ...
2
votes
3answers
72 views

Updating coordinates of vertex in polyline using Python and ArcGIS for Desktop?

I want to update the point coordinates which are not correct on polyline. I tried many times to update it using python, but my script didn't work. The first attribute table is the station_id and its ...
1
vote
1answer
44 views

How to use LIKE clause/condition in Arcpy.Exists/Delete

I would like to delete several raster files in an ArcSDE SQL Server database. I would like to do so with Arcpy. How can I succesfully use a LIKE condition to delete all files in my database that ...
1
vote
1answer
50 views

Can script using arcpy.mapping.MoveLayer() be made to run faster? [closed]

We're running ArcGIS 10.0 and using a python script to move layers, turn on the correct layers, zoom to the correct extent and export a pdf map. The script normally takes 30 - 35 seconds to finish. ...