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

learn more… | top users | synonyms (7)

0
votes
1answer
127 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
58 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
39 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
23 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
53 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
98 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
72 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
44 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
140 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
88 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
39 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
39 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
93 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
105 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
100 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
102 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
190 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
103 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
70 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
92 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
51 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
78 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
68 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
233 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
80 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
90 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
167 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
107 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
22 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
26 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
159 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
50 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
17 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
51 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
243 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
169 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
155 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
98 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
60 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
60 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. ...
1
vote
1answer
197 views

Arcpy - Out of memory [closed]

I'm new at making scripts and I´m having some issues in my first arcpy script. I've created a code that automates maps creation, and it's running ok but gradually increases the memory consumption ...
-2
votes
1answer
76 views

Running custom geoprocessing tools written for ArcGIS 10.x for Desktop in ArcGIS Pro?

I am developing geoprocessing tools for Arcgis Desktop 10.3. I also have ArcGIS Pro installed . Can I run geoprocessing tools (written for 10.x) in ArcGIS Pro? Is it theoretically possible? Can ...
0
votes
1answer
30 views

Finding & correcting missing layer in MXD using ArcPy? [duplicate]

Am struggling with ArcPy. Can someone help with a script to identify missing layers (red arrow in TOC) and then to search for the correct file locations & then update the mxd.
0
votes
1answer
17 views

Combining DataFrameTime object with ExportReports function in ArcPy?

using python in ArcGIS, I'm trying to combine the ExportReports function with the DataFrameTime object. For every date interval, an image of the Layoutview is exported and all the visible layers are ...
1
vote
0answers
39 views

Dividing points into Polygons based on an Attribute of that point and its relative distance to other points and a facility

I have random point data (school locations) that I need to divide into 'n' polygons (regions) based on: their distance to a facility, their relative distance to each other, and an attribute of that ...
0
votes
1answer
49 views

Is there an Export All Features in View Extent equivalent with ArcPy?

I would like to dynamically classify a layer's symbology based on the current view extent. As in, quantities of a specified field will be classified into quantiles based on the range of values of the ...