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

learn more… | top users | synonyms (7)

1
vote
0answers
31 views

Merged Function doesn't function properly [duplicate]

I am trying to use Python scripts and merged my entry FCs in to the defined GDB. But, the system giving me the error that "ERROR 000735: Input Datasets: Value is required". The following attachments ...
0
votes
1answer
25 views

Unable to change default geodatabse with arcpy.env.workspace

Even after I set the path for the default database with arcpy environment variable, ArcMap does not change the default database directory? At first my arcpy.env.workspace looks like below: ...
2
votes
1answer
69 views

Finding problematic rasters in large set of rasters using ArcPy?

Just wondering if anyone knows how to quickly find rasters that cause errors when I attempt to process them in cell statistics (as I am trying to sum them). I have many hundreds of rasters and don't ...
-1
votes
0answers
45 views

Intersect analysis with xy tolerance

I'm trying to add a point at the intersection of these 2 streets. Intersect analysis with xy tolerance return no result. If I keep myStreet as original (no unpslit) then the xy tolerance worked. If ...
0
votes
1answer
56 views

Merge function doesn't have output for all FCs, It has just first FC

The attached file is my script for merging different FCs as they get dissolve and join by the input FC. I don’t know why the output for merge does not include all FCs. import arcpy, os from arcpy ...
-1
votes
0answers
22 views

Dissolve function response great but Join field doesn't include all Original (Joined FC) attributes

The attached file is my script. I am trying to do dissolve and join to the input FC along copy and create FCs. I don’t know why the output does not include all Joined FC fields. import arcpy, os from ...
-1
votes
0answers
48 views

Dissolve function doesn't include Dissolved field

The attached file is my script. I am trying to do dissolve along copy and create FCs. I don’t know why the output does not include dissolved field. import arcpy, os from arcpy import env ...
1
vote
1answer
56 views

updating field based on another field with arcpy.da.updateCursor

My code is very simple and it should work, but it doesn't. Perhaps another set of eyes can solve my issue... I created new field (this part works), then look up value of another field and depending on ...
0
votes
1answer
61 views

How to find a datasets spatial reference and apply it to another dataset?

I'm struggling to use the describe function to find the spatial reference of a given shapefile and then apply it to another shapefile which has been copied to a projected folder. I'm relatively new ...
1
vote
2answers
50 views

ArcToolbox Date default to today

In ArcToolbox I have a script (arcpy) that calculates some info plus a date into a database table. The date required to write is often (but not always) the current date, so the tool asks for input of ...
0
votes
0answers
30 views

To get field value from a first table and search it in a second table

I create a script that allow me to display field values from my first table. How can I get value display with print in order to serach it in a second table. If values displayed using print doesn't ...
3
votes
1answer
35 views

Script tool Error - ERROR 000735: Y Field (Latitude): Value is required Failed to execute (ConvertCoordinateNotation)

I've a python code which was working in ArcGIS 10, but now since I've migrated to 10.2.2 didn't work.Basically it's a toolset which runs a python script. The tool allow the user to input coordinates ...
0
votes
1answer
34 views

Shebang line for ArcGIS Desktop [closed]

I'm writing a script to be run on ArcGIS for Desktop, which only runs on Windows machines. Is there any use for a shebang line at its beginning, and if there is then what should it be (e.g. ...
2
votes
1answer
58 views

Convert 5 digit serial date to mm/dd/yyyy

I have imported a table from Excel that has one field (StartDate) to hold dates. When I imported the table it into ArcMap, the date values in that field changed from DD/MM/YYYY to a 5-digit number, ...
1
vote
0answers
48 views

arcpy symbologyType is always OTHER, but I need UNIQUE_VALUES

I am trying to load a TIF file to the mxd using arcpy, then add a definition file to map colouring. For one layer I have the problem, that the amount of values will always be different, sometimes it ...
1
vote
0answers
39 views

ArcPy Dissolve Statistics Fields - fixed into variable

How can I change this fixed POP column into my variable: field = parameters[1].valueAsText. It says syntax error everytime. StatField = "POP MIN;POP MAX" arcpy.Dissolve_management(in_features, ...
1
vote
2answers
34 views

Append daily rasters to monthly lists in Python Arcpy

I'm trying to go over a folder of geotiff rasters where the last three digits of the raster name is the julian date and I want to append the correct days to monthly lists (Jan-Dec) and then run Cell ...
2
votes
2answers
97 views

ArcPy Field Calculation within Loop

I am writing an ArcPy script that will run from a tool with user inputs. The user will select an input layer and output name/directory. I have my current code below. The tool will then do the ...
1
vote
1answer
47 views

Choosing “method” in Python Toolbox

I am trying to make these two methods variable, so the user could choose which method he wants to use. If the one with 3 classes or with 5. arr = arcpy.da.FeatureClassToNumPyArray(in_features, ...
0
votes
1answer
19 views

Is is possible to use arcpy statement for multiple fields? e.s. arcpy.Intersect_analysis()

I am new in both coding and GIS. Now I am trying something new for me, which is using the for loop to execute some of the arcpy statement. For example, the Intersect_analysis statement. Following is ...
0
votes
2answers
30 views

ArcGIS tells me 'raster' isn't defined

I am trying to get zonal statistics for a set of geographical units for several years and I would like to get the output in one dbf table, where the rows mark the geographical units and each column is ...
1
vote
1answer
36 views

foreground arcpy.mapping.MapDocument(“CURRENT”) in python script in single ArcMap produces createobject errors

I'm running ArcGIS 10.3.1. and desire to list layers in the current mxd. I'm using the "CURRENT" method... arcpy.mapping.MapDocument("CURRENT") ...within a python script tool, accessed via a single ...
0
votes
0answers
36 views

Multi-selection from Combo box in Python AddIn?

Is it possible to select more than one option from a combo box list in python Add ins for ArcGIS 10.x? Here is part of the code: def onFocus(self, focused): if focused: ...
1
vote
2answers
56 views

ArcPy: Excel to Table Conversion and Join Management

I am trying to join an Excel table to a shapefile in ArcPy. My first step is to convert the Excel sheet to a table, but I am receiving an error: #Convert xlsx to table: import os import xlrd import ...
0
votes
1answer
32 views

SelectLayerByLocation keeps giving error 000840: The value is not Boolean

I've seen a lot of questions asked and answered about trouble with the Select Layer By Location tool. Most ask about invalid input errors and the answer generally is to make sure to use layers (as ...
3
votes
1answer
53 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
54 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
33 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" ...
2
votes
0answers
75 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
22 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
30 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: ...
1
vote
2answers
174 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
25 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
43 views

Failed adding a double data type value into feature class

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
38 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 ...
0
votes
1answer
22 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
32 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
37 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 = ...
0
votes
0answers
16 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
19 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
72 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
16 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
52 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
1answer
51 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
81 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
29 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
15 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
111 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 ...
1
vote
1answer
38 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
53 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 ...