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

learn more… | top users | synonyms (7)

3
votes
1answer
42 views

Calculating summary statistics and access resulting value in table using ArcPy?

With arcpy, I want to calculate the mean value of a specific field in a shapefile and print the resulting value for the user. I use the Summary Statistics tool and it works, but the resulting value ...
0
votes
1answer
27 views

Clip tool gives ERROR 000732?

I am trying to execute clip tool in python on arcGIS 10. But it gives error: ERROR 000732: Output Extent: Dataset D:/Work/Map/SampleGdb/Sample_02.gdb/Sample_02.gdb/Subcatchments does not ...
0
votes
1answer
63 views

Creating polyline using mouse clicks with Python Addin tool?

Can somebody tell me how to create a line geometry by mouse click with python addin? I am using below code in python addin tool. class ToolClass8(object): """Implementation for Testmsg_addin.tool ...
0
votes
1answer
38 views

SelectByAttribute is not working (ArcGIS, Arcpy. Python script) -

My script is below. I use to file from filegeodatabase to select all of rows (in a loop, one by one) to create a simple map and export it to jpeg. For some reason, once I updated my script to run ...
0
votes
1answer
39 views

Total Count in Attribute Table

I am trying to add all of the counts in an attribute table, to get the total number of counts (I am trying to figure out the percent aspect for a polygon). My code works fine, I am not getting any ...
3
votes
1answer
44 views

Getting full path for feature classes in dataset using ArcPy?

I have a python script that I am writing to create a copy of a database and then clean it up (basically remove any empty items). Everything is working with the exception of feature classes that are ...
2
votes
3answers
65 views

Search directory of shp files for an empty attribute value

I'm trying to search through a directory of shp files for any shp file with a specific field that is empty. Here is my code as of right now. import arcpy from arcpy import env env.workspace = ...
0
votes
1answer
45 views

arcpy custom script tool to find and replace floats and ints?

I created a custom script tool that can find and replace text. See the image link for what my tool interface looks like too, and I'll point out the find and replace fields are both set to string in ...
5
votes
1answer
71 views

Creating ArcPy scripting tool with dropdown box for sql expression choice

I am creating an ArcPy scripting tool to allow users to select a feature from a feature layer and then zoom to that selection. I have successfully created this tool and now am working on creating the ...
1
vote
0answers
123 views

Python with ArcGIS: import scikit-learn fails (bad numpy.dtype)

I am trying to install scikit-learn 0.17.1 (current) into my Python 2.7.3 that accompanies my ArcGIS 10.2. The installation through easy_install goes through smoothly, but I get the following error on ...
3
votes
2answers
31 views

ArcGIS 10.2 Model Builder If no selection is made, then do not append to empty feature class

I'm creating a model in model builder that is very easy to construct and understand. However, I ran into a slight problem. The logic of the model is that it will take user selected features from a ...
0
votes
0answers
16 views

Create Polyline line by Mouseclick using python addin [duplicate]

I am trying to create polyline by using python Addin tool. but could not understand properly how it works. the Python Addin Tool is not much documented in Esri Website. so i am not able to understand ...
1
vote
1answer
29 views

Operations lists arcpy

I have a list with 4 raster files and another list with 4 vector files. I want to relate each of the raster file 1 file list 1 vector list. I try to do and I related file 1 raster to vector file ...
0
votes
1answer
70 views

Using variable in Arcpy select analysis

I need to use arcpy.Select_analysis() in my arcpy script, but I have problem with using variables. When I use hard coded values in where_clause, it is working. where_clause = '"Area" > 20' ...
1
vote
2answers
91 views

How to keep a parameter blank in a script tool?

I've developed a sort of find and replace script tool that functions. But I'm not able to figure out how to find empty cells in fields and replace them.For the "Find" parameter, I have tried ...
0
votes
1answer
50 views

Populating the drop down of GPValueTable

In a Python Toolbox the user has to select a city from a list of 50 world cities. More than one city can be selected. The best UI control for that would be Autocomplete / Autosuggest, but since this ...
0
votes
1answer
47 views

Writing Python Script to Iterate through several geodatabases in folder and copy feature classes to single geodatabase?

I need to go through multi GDB in 1 folder and copy all feature classes from each GDB and copy them into the single GDB. I create a piece of python code that can go through each different GDB and also ...
5
votes
1answer
102 views

Using feature class name as name in output (buffer_analysis)

I'm pretty new in python, and I'm trying to iterate through a list of feature classes, and perform a buffer on each feature class. So I've done this: import arcpy from arcpy import env ...
3
votes
2answers
274 views

ImportError: No module named pandas in Python window of ArcMap after installing with pip?

I have downloaded pandas from this site then unzipped it in site-packages and run python setup.py for installing pandas. Pandas was installed successfully. After that I tried importing pandas into ...
0
votes
0answers
18 views

Fuzzy membership output different in arcpy and desktop

I am running a fuzzy membership on multiple rasters with the following code: arcpy.env.workspace=r'F:\Sheyenne\Normalized_Indices\NDII' ...
2
votes
1answer
27 views

Problems with insert cursor

I am counting the number of features in a geodabase. I am triying to insert the feature name and the count inside a dbf table which has only two fields: "FEAT" (Text field which containts the feature ...
0
votes
1answer
51 views

Creating Replica using ArcPY with check_out type

I am running the following command in python and it works fine no error but it does not generate a mdb in output path folder and give me the input path result as output child source ...
2
votes
1answer
74 views

Developing find and replace script tool?

I'm being tasked for developing a script tool that can find ultimately needs to be able to find any string and replace it with another string in an attribute table. Below is what I have so far, and it ...
0
votes
1answer
34 views

Get filepath then append a feature class to that feature class Python Addins

I'm trying to use tool bar buttons (python addins) to add a filepath and then append another feature class (known to have identical schema, no test needed) to that filepath. My syntax isn't working ...
2
votes
1answer
64 views

Spell checking for ArcGIS Desktop?

Looking for a free spell check for ArcGIS 10.1. Someone wrote a VBA for pre-10 here. Is there a way to implement it in 10.1, perhaps writing it in python instead of VBA?
4
votes
1answer
110 views

Creating arrays and polylines from dictionary using ArcPy?

I have created a dictionary out of a csv values from an excel spreadsheet. I'm trying to use the keys and values in the dictionary to create arrays (one per 'Rhino') that I can use to create ...
3
votes
1answer
156 views

Not getting correct result from for loop

The for loop below works without error, but the result is get in the table of my database is wrong. Its as if the for loop skips right over the first 3 if and elif statements and goes to the else. The ...
0
votes
0answers
25 views

Arcpy Select by Location out of memory

I have multiple lines (lines) intersecting points (centroids) from which I want to extract landuse values and then write the extracted values to the lines as 'land1' and 'land2' values. I need to ...
1
vote
0answers
50 views

Select Layer By Location (Management) gives different result in ArcPy and ArcMap?

I have two line Shape files. When I use the Select layer by location tool to select two intersecting lines, it works fine and selects only lines which are actually intersecting. But when I use this ...
1
vote
1answer
41 views

While loop with Select by location (Add to selection) is not stopping

I have problem with my while loop code. It is not stopping, despite that values used to evaluated the condition to stop the loop are actually met (I can see in in my print statement). Here is the ...
0
votes
1answer
47 views

How to add multiple text elements in ArcMap using ArcPy

I've been able to add a dynamic text element (with an element name of 'TestName') that reflects a layer name and that changes for each corresponding exported layer to a GIF. I am now trying to add a ...
0
votes
0answers
7 views

Fixing error arcgisscripting.ExecuteError: ERROR 000358: Invalid expression Failed to execute (SelectLayerByAttribute)? [duplicate]

This is my code: import arcpy arcpy.env.overwriteOutput= True inputpath= "S:\\376\\Spring16\\jthoma16\\Lab 5\\Lab05_data\\part2\\" outputpath= "S:\\376\\Spring16\\jthoma16\\Lab ...
1
vote
1answer
95 views

Calculating angle between polyline segments and assign this value to point?

I have a polyline feature with many segments (polyline splitted at vertices). I plan to record angle values to attribute table per each polyline segment and assign it to point features. I need to ...
2
votes
1answer
78 views

Accessing layer properties with arcpy

I have a process that I'm trying to streamline. On a regular basis I have to produce ArcPad base maps for low end GPS units. The area that I need to cover is very large (ca. 7 million acres). I've ...
0
votes
1answer
75 views

ArcPy - Symbology Color Changes After Setting Class Break Values

I develop a python script tool to adapt the symbology of a set of shapefiles based on a given symbology template (layer file). These are the properties that should be changed: Number of classes and ...
0
votes
1answer
86 views

Select by location using ArcPy

I try to select by location all layers that intersect layer named "frame", and then remove from the maps other layers that don't intersect it. Finally, i want to print the all the removed layers and ...
1
vote
1answer
59 views

Insert (or Update) Cursor setting value to None not honored when field has a default value

To set a field to null, the InsertCursor or UpdateCursor is setting the value to None. Here is a sample for the UpdateCursor: with arcpy.da.UpdateCursor(test_fc, ['SERVICEINDICATOR'], """"OBJECTID" ...
2
votes
2answers
79 views

Python script runs in ArcCatalog and ArcToolbox, but not in PyScripter

I have a script that imports a custom toolbox, copies data from an sde to a file/personal gdb, removes custom feature class extensions, etc. The script runs fine in Catalog, but I receive the ...
4
votes
0answers
59 views

Cell Statistics standard deviation values incorrect

I'm having some issues with the Cell Statistics tool in a python script I am writing. I am using 30 years worth of global cumulative annual rainfall data as input and am getting strange values in some ...
1
vote
1answer
52 views

How to create dynamic text in ArcPy that recursively reflects the exported layer name from a list of layers

I have a script shown below with the help from @Midavalo that exports irrig_0, citylyr, boundlyr as a GIF. Once this is done the script then exports irrig_1, citylyr, boundlyr as another GIF and so ...
0
votes
0answers
34 views

Redrawing multisegmented lines as arcs using measurements stored in attributes

I'm beginning the process of moving our local government cadastre data in to a topologically clean parcel fabric layer using ArcGIS. I'm at the stage where I'm looking to clean the data and get it ...
1
vote
0answers
51 views

Adding multiple fields to feature classes in enterprise geodatabase using ArcPy?

I am very, very new at python and am trying to put together a tool that can be run on an enterprise geodatabase that will add a series of fields to each feature class. So far I have only been able to ...
1
vote
0answers
29 views

Size of the Output Files Cannot Match After Converted From Polygon to Raster

Basically, the emodisfile is the raw data file, and shapfile is one of the CLU shape files. I need to convert the shapefile from polygon to raster and then to ASCII file based on the emodisfile. So I ...
3
votes
2answers
39 views

How to detect Query Layer for toolvalidation using arcpy?

For an arcpy toolvalidation script, I have been trying to figure out a good way to detect ArcGIS layer files (*.lyr) based on "Query Layers", and to distinguish them from "normal" feature layers ...
0
votes
1answer
50 views

Invalid Expression ERROR 000358: Select by Attribute

I'm attempting to select a certain point in a feature layer so I can perform buffer analysis on it. The code seems fine, but I am getting an invalid expression error: File "C:\Program Files ...
0
votes
1answer
56 views

Arcpy turns off all fields in a MXD file that all of the values are Null [closed]

I am trying to turn off all fields in a MXD that have all null values. I have been looking at a SearchCursor without much luck.
1
vote
1answer
34 views

Arcpy how to get field names dynamically from shape file in customized plugin?

On selection of a feature layer ArcMap tools display all the fields, Zonal Statistics is one of the example. I have entered my feature as fishnet and it has shown me all the fields in a list below. I ...
2
votes
1answer
56 views

Why is my ArcPy script deleting its workspace?

I wrote an ArcMap script to go through a feature layer, identify unique values in a given field, and output a feature class from each unique value to its own feature class or shapefile. As an ...
2
votes
0answers
46 views

Identifying lines of one feature class that touch another feature class with their endpoints in ArcMap? [closed]

I want to find out and select the features of one feature class, which both endpoints touch another feature class. In the picture above it would be the left pink line which touches feature of ...
1
vote
0answers
58 views

Python Addin - Run script from button [closed]

I'm developing a Python Addin for ArcMap. This will consist of a button that will run another python script: import arcpy from arcpy import env import pythonaddins import os class ...