A site-package created by Esri to expose ArcGIS for Desktop (and ArcGIS Pro) geoprocessing, mapping, etc, to Python.

learn more… | top users | synonyms (8)

3
votes
1answer
69 views

Create SDE-file returns warning but creates the file

When I create an SDE-file using arcpy I get the following warning: WARNING 000565: Could not connect to server. This is the appropriate code temp = r'C:\Users\admin\AppData\Local\Temp' host = "...
0
votes
1answer
66 views

Python Calculate Cumulative Polygon Areas (Basins)

I've been asked to automate the calculation of cumulative polygon areas within a basins shapefile. The calculation will take the area of the upstream basin and add it to the area of the downstream ...
0
votes
1answer
43 views

Problems passing where clause as variable?

I'm having trouble passing my where clause for arcpy.SearchCursor as a variable. The following code successfully generates a query for me: PolyList = "C:\\Users\\korora912\\Desktop\\polygons.shp" ...
3
votes
1answer
156 views

Dissolve Management in Python

I have a simple code that is pulling together polygon shapefiles from a Windows folder and merging them together into a single shapefile. In the same code, I want to add a dissolve command. My fields ...
0
votes
2answers
28 views

arcpy raster to polygon without merges (or assign autoincrement values to raster cells)

I have a raster dataset (tiff) and I want to get a shapefile (polygons) that preserves all cells. Unfortunately, the Raster to Polygon tool automatically merges all adjacent cells with the same ...
0
votes
1answer
41 views

arcpy CopyFeatures_management fails when trying to copy annotation layers

I have a python code (using arcpy) trying to copy data into memory. the data is an annotation layer (which probably contains special characters and/or chars) I have the following code: arcpy....
1
vote
2answers
177 views

Can a tab masquerade as a space in a unicode string?

I have some code that is intended to remove spaces from some data I'm ingesting from a group of shapefiles into a number of feature classes. The malformed data consistently looks like this: ...
1
vote
2answers
28 views

Arcpy script appearing in text format in arcgis 10.1 but in Idle (normal) format in arcgis 10

I added my arcpy scripts in Arctoolbox. But, when opening in edit view in Arctoolbox in Arcgis 10.1, they are opening in text format instead with Idle edition mode. That is not appearing in Arcgis 10. ...
0
votes
1answer
45 views

Failed adding a double data type value into feature class [closed]

I'm using ArcGIS 10.1 and I failed adding double data type value into my feature class. I used gp.GetParameterAsText(2) to get a double data type number. Does it ok, or should use another function, ...
1
vote
2answers
45 views

Cannot insert data into my feature class

I'm using Arcgis 10.1 and I created my script for inserting data in my feature class but I got this error message: Traceback (most recent call last): File "C:\SIG_AS\Shapefiles\Projet2\MyScript\...
0
votes
1answer
26 views

Subtract each raster in a list by one before it

I have a list of rasters named like so: 19940506.tif 19950506.tif 19960506.tif 19970506.tif and I want to subtract 19950506 by 19940506 and 19960506 by 19950506 etc. I can do this manually with ...
1
vote
1answer
37 views

Private functions in Python Toolbox

Is it OK to have private functions in a python toolbox? I know it's possible because I tried. But I don't know if that's OK, I haven't seen anything in the Internet where someone from ESIR is using ...
1
vote
1answer
38 views

I only know how to turn off the entire current layer. But I want off only some of the layers specified

I only know how to turn off the entire current layer. But I want off only some of the layers specified #turn all layers in current map doc on: print "Button2--turn on layers" mxd = arcpy.mapping....
0
votes
0answers
20 views

How can Qt viewer be opened from ArcGIS?

I have a standalone Qt viewer. I want to open Qt viewer from ArcGIS when user clicks on any point in a point shapefile and Qt viewer shows the data from attribute table of that shapefile.
0
votes
0answers
29 views

Why is Majority so much slower than mean in Focal statistics?

I am trying to use this solution to clean up small holes in my rasters. It uses focal statistics on the no data cells to replace them with a local average. The raster have a small number of unique ...
0
votes
1answer
398 views

Error using pip install for arcpy: “Could not find a version that satisfies the requirement arcpy…”

In my command line I typed python -m pip install arcpy to install arcpy. I got this error message in return: "Could not find a version that satisfies the requirement arcpy (from versions: ) No ...
0
votes
1answer
20 views

Calculate zonal statistics with two different types of zones (provinces and longitude*latitude grid boxes) in ArcGIS?

I am trying to get zonal statistics in ArcGIS with two different datasets. One is a world map with zones defined as "provinces (such as the US states)" and the other is a temperature dataset with ...
2
votes
1answer
55 views

Trying to make many polygons from points? [closed]

I am trying to turns points into polygons, but I encounter this challenge : My data set has 1000 entries. Each entry has 360 associated columns, each with a coordinate pair. When connected, these ...
1
vote
2answers
41 views

Model to create layer from joined MS access table

I am using arc10. I created some queries in MS access that I can open up in arcmap utilizing the database connections. It works fairly well but is rather slow. I wanted to know if there is a model ...
1
vote
1answer
89 views

ArcGIS 10 arcpy to add a WMS Service to MXD

I want to batch insert WMS layer to my arcmap MXD project with python/arcpy script. Some issues has been unanserwed, here my "state of art": ESRI IDEAS ESRI GeoNet community #1 ESRI GeoNet ...
5
votes
3answers
100 views

Limit to number of items using 'IN' SQL syntax in arcmap/arcpy?

I'm writing a python script that uses 'NOT IN ('a', 'b', ...)' statements on very large lists (like comparing 500 items in one feature class against >10k items in another) and am getting weird ...
0
votes
1answer
39 views

raster calculator fail to sum?

I am having a question about the raster calculation as I am trying to create a tool which I want to link with my python script to sum weight rasters but if failed to do so. here is my code: #*the ...
0
votes
0answers
20 views

Compare domain between 2 SDE instances

I have a script that compares domain between 2 file gdb and write the difference to a file gdb. when i change my data source to sde it fails. I think the way tables are referenced in a GDB is ...
0
votes
1answer
144 views

arcpy.da.UpdateCursor updating field based on the previous row

I am quite new to python. As you can see from the image attached to this post. I have polylines with From junctions (fnode) and to junctions(tnode) field. My goal is as following: To update draw ...
2
votes
1answer
40 views

Deleting Duplicates from Multiple Tables in a GeoDatabase

I'm having trouble deleting duplicates from multiple tables in a geodatabase. I have a field "facility_id" which should be unique, but I have multiple entries and need to delete all but one. I've ...
2
votes
1answer
69 views

Updating multiple fields with list values using arcpy.da.UpdateCursor

I have a script that contains a function that fetches XML from a web service, containing a series of metadata values. The function takes a field from a feature class as criteria, queries the web ...
1
vote
1answer
68 views

Loop over pixel data using Python in ArcMap

Further to my question on SO I'm trying to check the validity of bitmaps. Mainly for transparent or black pixels. I'm new to ArcMap, and I now know that Python scripts can be run from Arc. Any ...
0
votes
1answer
71 views

Writing attributes and associated feature class name from file geodatabase to CSV?

I need to write a csv file that lists every record from an ID field across all feature classes in a gdb. The code I have written below does that fine, but I also need to write in the second column of ...
3
votes
2answers
187 views

Remove duplicates from a field

I need to remove duplicates from a field named "Intersecti" Here is my code. I used list..set. It's not removing any duplicates. import arcpy duplicates = "G:\\xStreetNew\\Duplicates.shp" ...
1
vote
2answers
65 views

Looping fields in an update cursor

I'm running an update cursor on an in_memory feature class to remove blank (but not null) values as part of a larger process. I wanted by update cursor to loop through my list of fields and if the ...
2
votes
2answers
74 views

Creating a list using an attribute query with arcpy.da.SearchCursor

I have a shapefile of a river network containing the following fields: toJunction, fromJunction, Int_DAM (which indicates free-flowing status) and Strahler. I'm trying to create a list of the rows ...
0
votes
0answers
50 views

ArcGIS 10.2 Custom Tool Sort Drop-Down-List by another field of table

I'm making a Custom Tool in which the user could select one input-parameter from a field of a table as a Drop-Down-List. The issue is, that I don't want to sort the Drop-Down-List in alphabetical ...
4
votes
3answers
377 views

Why [0] is needed in row[0] when using ArcPy (Data Access) cursors?

when running the following 2 sample codes, "[0]" is needed to be added after "row" in order to make code run well. I was confused. can anyone help explain? I know that it might be too easy for most of ...
0
votes
0answers
8 views

Display 3D collada files and shapefiles [duplicate]

How do I display 3D Collada (or Multipatch) building model along with some 3D buffer shapefiles using python? I was using arcpy for buffering, but arcpy does not have the feature to add shapefiles ...
0
votes
2answers
101 views

Importing/Plotting Lat/Long points from single column of *.csv using Python?

I have data in a .csv that looks something like this: Entry A Xa0,Ya0 Xa1,Ya1 Xa2,Ya2 Entry B Xb0,Yb0 Xb1,Yb1 Xb2,Yb2 Entry C Xc0,Yc0 Xc1,Yc1 Xc2,Yc2 The ultimate goal is to plot ...
1
vote
0answers
30 views

creating a new layer/selection based on the conditions in Python script? [closed]

Is there any easy way how to write a python script, which would create a new layer based on location from a border line and "if" condition? I have two layers A and B, both are made of several ...
1
vote
1answer
40 views

Point coordinate shift after python toolbox processing

I am working on custom clustering in ArcMap. For it I have created a python toolbox, where I do the processing. However, as a result I get slightly shifted points (6-20 meters), while they shall stay ...
3
votes
1answer
88 views

ArcGIS model and python script integration

I'd like to make a model with a last step, a python script, that will send an email, containing messages and status of the model. The email sending part is okay, nut the hard part for me is to query ...
0
votes
1answer
23 views

ArcGIS Group points that sum to a certain value based on the the closest distanceto main feature

I am looking for a tool, or a set of tools/procedures (scripts or models) that will calculate the distance from one Main point to a cluster of points around it, then selects or joins, or somehow ...
0
votes
0answers
41 views

how to export selected data to json format

I have a layer called parsel. I want to export all history of this layer. I created parselall_view with history tables (A,D) , I want make a geoproccessing service that service all data of ...
2
votes
1answer
110 views

Making a tool from script, arcpy.Project_management () comes with an error

I have a script (just a fragment here, up until the line after which the error comes up): import arcpy from arcpy import env arcpy.env.workspace = arcpy.GetParameterAsText(0) arcpy.env....
0
votes
2answers
39 views

running scripts of codeblocks in arcpy with syntax error

I am having a trouble in running the following scripts: import arcpy arcpy.env.workspace = r'C:\MyData\my_geodatabase.gdb' max = 123 min = 0 mean_s = 12.3 expression1 = "test(!mydensity!)" codeblock1 ...
0
votes
0answers
27 views

Ansible/TeamCity/arcpy import issues

we are trying to implement remote instantiation of a python application that uses arcpy. The scripts work perfectly fine when running on the virtual machine when logged in as a user. However when ...
1
vote
1answer
73 views

Arcpy get values in the 2nd field of every table in a geodatabase

I have a geodatabase in Oracle with around 50 tables. I want to get the values in the 2nd field of every table in my geodatabase. I will be using the values in the 2nd field as an input for a ...
6
votes
2answers
147 views

Spatial Join Yielding NULL values in ArcPy?

I'm writing an automated script to do some data processing of address points. One stage of the process is to retrieve 19 fields of information from various polygon layers that the Address Points are ...
1
vote
0answers
39 views

Feature Layer parameter showing only Polygon Shapefiles

I have created a Python Tool in ArcGIS where most of the paramaters musts be ONLY Polygon Shapefiles. You can also look on my previous question: Filter the Feature Layer parameter in Python Script ...
1
vote
1answer
120 views

Zoom/Pan function in python addin tool

I have created one python addin tool which creates some points along a line, it works good. my problem is when my tool gets activated i am not able able to zoom/pan the map. map view just get stuck ...
2
votes
1answer
48 views

comparing rasters, cells that have changed value

I am attempting to compare two rasters representing a species distribution model for now and the future. The rasters have the exact same extent and cell sizes. here is when is gets tricky, they are ...
2
votes
1answer
51 views

Change Date to Future Date in Map Title Using Python or Dynamic Text [duplicate]

I'm trying to create a dynamic map title in ArcMap that updates based on current day + 2 days. For example, if I run the code on the 20th of a given month, the title should update to show the 22nd. ...
1
vote
0answers
35 views

Why are my modifications to UniqueValuesSymbology classLabels not following through to PDF export? [closed]

I have a vector layer that I add to a data frame. I modify the unique values symbology class labels. I then export the map document as a PDF and the labels in the PDF do not reflect the modifications. ...