A site-package created by Esri to expose ArcObjects to Python.

learn more… | top users | synonyms (1)

0
votes
0answers
11 views

Using ArcPy update cursor to update overlapping feature values?

I have a Geodatabase in ArcGIS 10.2 and would like to update the blank values in the 'Soils' field from the 'Landuse' Feature Class in the 'soils' Feature Class where the 'SoilType' falls within ...
1
vote
1answer
15 views

Using layer file to apply symbology to shapefile with ArcPy?

I have code that doesn't work at the moment: # Import arcpy module import arcpy # Script arguments Input = arcpy.GetParameterAsText(0) if Input == '#' or not Input: Input = "frame" # provide a ...
0
votes
0answers
12 views

Error 999999 “The table already exists” “No spatial reference exists” when using “import arcserver”

I'm hoping someone can help me understand why I'm getting this error. I have a python script tool that throws this error when it is run through the task scheduler: Traceback (most recent call ...
1
vote
1answer
51 views

why does my script not save a layer when it encounters a “ \” character in the string

i have some code that takes a field and finds every unique value in that field. it then creates a layer for each unique value. The code is working ok , but it is failing when there are \ characters ...
0
votes
0answers
21 views

Wrap Legend Text in ArcMap using Python

Is it possible to use Python to wrap text in a legend in ArcMap so that the entire legend element will fit on a page? Here's a screenshot of my problem: http://s21.postimg.org/ss1x2rgpz/before.png ...
1
vote
0answers
20 views

Are there any conditions that could break the creation of an arcpy.Polygon object?

I have a script that generates a mesh network from vertex and centroid inputs, and it works for almost all my points. But for some records that get created in the feature class via the script, their ...
1
vote
1answer
12 views

Most efficient way to retrieve pixel distributions inside many polygones (custom zonal stats)

I want to get the distribution of pixels from a 1 band raster that fall in each polygon of a shapefile to proceed to some statistics. I guess a zonal statistics does it in some kind of way but I need ...
1
vote
1answer
46 views

What defines where the files will be saved?

Hi I have a script I am using to save out layers automatically I have posted another question here ArcGIS creating individual layers for unique attribute in a given feild. Limitations of Where ...
1
vote
1answer
82 views

Change field names automatically

I have an attribute table with over 2500 fields. About 2000 fields start with the name "All_txt_" (eg "All_txt_Watermelon"). Is there a way to remove this "All_txt_" from all the fieldnames ...
1
vote
1answer
15 views

How to make a loop for select by attribute?

I am trying to pull out a sample out of a geodatabase file. I have 100800 sample and I need to select 28 records, basically every 3600, I am going to start with FID=0 and go from there. Unfortunately ...
1
vote
1answer
33 views

Exporting shapefile to csv with cursor

I'm trying to export a shapefile to a csv file using a cursor. I found this quesion asked and answered here: Exporting table to XYZ ASCII file via ArcPy? However I only want to export several ...
2
votes
2answers
27 views

Controlling default value of arcpy.AddField_management

I have a large collection of shapefiles that use text fields to hold numerical values. I have created new fields, and populated them with the numerical equivalent of the text field. When adding the ...
0
votes
0answers
49 views

UpdateCursor not iterating as desired, updating erroneously

(EDIT BELOW WITH WORKING CHANGES) I have a script in which I am trying to compare attributes in row n to row n+1. If all the attributes match, I want row n+1 to have a field ([Modifier]) updated to ...
2
votes
4answers
92 views

How to get values of last row in table with ArcPy/SearchCursor?

I would like to base my query on the last row of a table? I know the basic syntax/functionality for my search cursor, how do I query only the last row; Below is an example of my search criteria, ...
0
votes
0answers
33 views

ArcGIS creating individual layers for unique attribute in a given feild. Limitations of Where Clause

I am putting together some code that makes a layer for each unique attribute within a given field. So if I had a shapefile that contained point data for locations of say postboxes in every city , for ...
1
vote
0answers
27 views

Is it possible to consume an ArcGIS Hosted Table into a local or SDE geodatabase?

I would like to publish a table to our ArcGIS Online organization account, is it possible to consume hosted features in AGOL to a local db or sde database connection? By consume I mean import a ...
0
votes
0answers
16 views

Arcpy MakeGraph “Parameters are not valid”

I have a Python add-in that should create a graph based on the location ID of a water quality testing station. The user clicks on the point and a relevant graph should be created in the layout window. ...
1
vote
2answers
50 views

Convert a string field to a number field using arcpy

Accidentally posted this in the general stack overflow forum first. I have a large (>1000) number of shape-files in which there are fields containing numbers that are defined as text fields. I need ...
2
votes
0answers
26 views

Error inserting new column in ArcSDE table (ERROR 999999)

I am using a python script to populate a table with values I get from rasters files. I use arcpy.AddField_management to add a new column and arcpy.CalculateField_management to insert the values for ...
3
votes
3answers
75 views

Insert cursor for first row in unique value set arcpy

I really need some guidance on how to create a python script with arcpy to: 1) Search through a table for unique values in a field. 2) For the first row in each unique valueset, insert that row into ...
0
votes
0answers
28 views

Python error in array declaration

I am getting a error as follows File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy__init__.py", line 2292, in NumPyArrayToRaster return _NumPyArrayToRaster(*args, **kwargs) ValueError: ...
-2
votes
0answers
24 views

Another set of questions - Cursors [on hold]

yet another set of question please: i) How do I use a cursor to parse through the features in this dataset to determine if any hydrants are more than ten years old (hint: use the Year_Const field). ...
0
votes
1answer
23 views

ArcPy Lists, describe funtion, loop [on hold]

could someone please help with me with the following? Just need to get an idea of the flow of the code. i) How do you use the ListFeatureClasses function to create a list of all the shapefiles. Loop ...
0
votes
1answer
24 views

pop() method returns error with feature class list in ArcGIS python toolbox

I am trying to do something very simple, but I'm pulling my hair out with this one. In an ArcGIS python toolbox, for one of my tools I ask the user for a list of feature layers, using the following ...
3
votes
2answers
32 views

Using field mappings to not carry over fields

I've tried multiple times to understand field mappings and continue to be rather baffled. I assume it can be used to perform a geoprocess (in my case it will be a spatial join) and limit the fields in ...
0
votes
0answers
42 views

Generate individual Maps for each Point in a shapefile or a csv file

I am using ArcGIS 10.1. Lets say I have a shapefile or a csv file with 10 points and their address. First column consist of point ID, second column consist of full address.Lets say I want to create a ...
0
votes
1answer
28 views

Hyperlink Script to Open Shapefile in ArcMap?

I'm new to Python and need some help please. I have a shapefile (Index.shp) that is used as an index for the world splitting it into 264 areas (polygon). I'm trying to create a Python script (for the ...
1
vote
1answer
44 views

Python error in Con function

I am trying to add two different rasters using the Con function. I am iterating the raster layer using the for loop to obtain two rasters belonging to the same species and their formats are in grid ...
0
votes
1answer
21 views

Python error in polygon to raster conversion

I want to convert polygon to raster. I converted the dbf file ( "cntymam") to table view to make use in the conversion. I am getting a error that the parameters are not called and also with the grid ...
0
votes
0answers
27 views

arcpy.da.Walk not adhering to datatype filter “Locator”

I have a file gdb containing feature classes and address locators. I am listing and storing the names of the datasets using arcpy.env.workspace = "C:\input.gdb" (root, fds, ftrs) = ...
0
votes
1answer
12 views

Using Update_Cursor to fill new field

The goal is to crate a new field call "Full_Address" in which the "ADDRESS", "CITY","ST_ABREV" all appear together. I can get use row.getValue for 1 field but not more. import arcpy in_table = "C://" ...
0
votes
1answer
21 views

Python error in search cursor function

I need to access the dbf file to extract variable list (i.e. "CODE"). Basically I am calling dbf file to allMamrows variable and then I am appending using for loop. On running the script I am getting ...
1
vote
1answer
26 views

Script to Mark and Zoom to UTM Coordinate

I am currently working with ArcGIS 10.2.2 and need a script to create a tool (if possible). I have USGS 7.5'Quad Maps as my base and a series of UTM coordinates representing sites. I would like the ...
1
vote
1answer
42 views

Stand alone - Python Append (multiple shps from a folder to one dataset)

I have users creating data (shp) daily into a specific folder, I already know how to invoke GP tools to append these data sets into one. What I am trying to do is run a task (which I already know) to ...
3
votes
1answer
33 views

Problem with arcpy select statement

I have a shp layer with an attribute table. One field has the name Nid and the values are strings (e.g. “0150”, “0420”, “3462” …) Now I want to select the rows in the table that match a given Nid ...
2
votes
1answer
32 views

Clip Point Features to Polygons with Model Builder/ArcPy

Here is the context of my question: I have point features for about 2000 individual trees spread throughout 50 different tree districts. The tree districts are polygons in a polygon feature class and ...
0
votes
1answer
12 views

Clipping Features in list creates error

I need to clip all of the feature classes in the .gdb to a layer then add the results to a results dataset. However it returns the error. "Error 000210:Cannot create output ...
0
votes
0answers
46 views

Script runs in ArcMap Python window but not in stand alone Python win or IDLE

I am attempting to automate some basic geoprocessing for a web map service. I am using Arc Desktop 10.1.This code was built in model builder and exported to python. This runs perfectly in Arc Desktop, ...
0
votes
0answers
50 views

Not matching schema problems when appending a list of CSV's into an existing FGDB table

So far I have the following code for creating the FGDB table and defining fields which works just fine. But when I try to append a list of csv's to this table I always get a matching schema error. Do ...
0
votes
1answer
20 views

raster to point in batch mode using Python

I have a list of raster files in tiff format and I want to convert that tiff to point using raster to point conversion (tool of ArcMap). This tool will convert the raster into a point shape file. I ...
4
votes
2answers
115 views

Command syntax in ArcGIS python script

I'm in the process of learning to use python to automate some tasks in ArcGIS, and while I've done a couple of on line courses about python I'm still learning to use it within ArcGIS. I've had some ...
1
vote
1answer
51 views

Add layer to mxd files ignoring specific item- arcpy

I try to add layer (abc) to several mxd files with arcpy and ignoring mxd file which called "land use" . I work with arcview 10.3 : import arcpy,os,sys,string,datetime import arcpy.mapping from arcpy ...
3
votes
1answer
70 views

Alternative to an arcpy script for points to lines to polygons?

I'm relatively new to arcpy and python, so I feel like I could be missing something obvious in regards to tool options for what I'm trying to achieve. I have a script that creates triangular ...
0
votes
0answers
21 views

setting data frame extent set to a shapefile

I need to set the data frame extent set to a specific shapefile in my Table of Contents. I am not sure how to go about this. Some of the codes I have found deal only with zooming into a selected ...
0
votes
1answer
46 views

Creating Tkinter dialog box in arcpy?

I would like to create a dialog box which pops up when the user click on a button from a Python Add-In toolbar. The user will navigate to their preferred file and select any shapefiles they wish to ...
1
vote
1answer
46 views

Converting multiple File geodatabase (.gdb) into multiple Personal geodatabase (.mdb)

Individually I will Export the gdb to XML Workspace then import that into the personnel geodatabase and all Domains go over fine. But... Let's Say I have several file geodatabase in a folder and Each ...
1
vote
1answer
38 views

What is causing these streaks in my output tif using arcpy.CopyRaster_management?

This is the line of code that is creating these ... arcpy.CopyRaster_management(raster, fname, "DEFAULTS","0","","","ColormapToRGB","8_BIT_UNSIGNED") and I did have a colormap file with specifics ...
0
votes
0answers
20 views

Spline tool using arcpy

Trying to use an arcpy script to operate the spline interpolation tool in spatial analyst on point data that represents soil sample points. When background processing is enabled I get an error of ...
1
vote
1answer
29 views

Arcpy script- Update cursor error

This is a follow-up question to a previous post. For some reason the following script in Arcpy does not want execute the command. Please see fields and script below. (All credit to Aaron for the ...
1
vote
1answer
51 views

ArcGIS python script validation to update the text based on a list

I'm having issue with using validation to update an input box. Some background: I created a tool to update and resize text in ArcGIS. This is done by having a series of text elements and shape ...