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

learn more… | top users | synonyms (1)

0
votes
0answers
5 views

How to specify raster name and how to designate the saved name of a created raster

import arcpy from arcpy import env from arcpy.sa import * arcpy.CheckOutExtension("Spatial") env.workspace = r"G:\GHY_568\project" mystery_creek = r"G:\GHY_568\project\Mystery_Creek.shp" ...
1
vote
0answers
16 views

arcpy.Delete_management does not delete the directory

I got a problem with Delete_management when I use the FeatureclassToCoverage_conversion function. I don't know why in the gdb I use (arcpy.env.scratchGDB), while the Delete_management is working, the ...
0
votes
1answer
23 views

Extracting from attribute tables by arcpy

I'm having some trouble connecting ideas on how to solve a problem. What I have is a shapefile from which I have to extract from one field, which contains 3 types of attributes (BS, RS, BRN). For each ...
1
vote
0answers
17 views

Functionality from Arcinfo to ArcSDE

The backup process creates a new point coverage, in which each coverage polygon contains zero, one or more points, each point attributed with information regarding a region subclass. A polygon ...
0
votes
1answer
21 views

Python geoprocessing tool for ArcGIS online

I am looking to create a geoprocessing tool using python in arcGIS 10.2 that will be used in the ArcGIS online web app builder. This will be my first tool for a web application and I would like some ...
1
vote
0answers
27 views

arcpy search cursor not working

Im running my script in ArcGIS 10.2 and the dialog window says success after selectbylocation, but the empty fields aren't getting populated. I guess the script isn't finishing but I'm not sure where ...
1
vote
0answers
24 views

Import shapefiles into PostGIS using Python with psycopg2

I want to import shapefiles to PostGIS using Python with arcpy & psycopg2 to connect to PostGIS. I don't want to use the existing shapefile loader nor ogr, just write my own import tool. My steps ...
1
vote
1answer
18 views

Using “calculate field” in python script fails to display Arabic characters correctly

Using “calculate field” in python script fails to display Arabic characters correctly. I have exported the modelbuilder to python script, but unfortunately the Arabic characters cannot by displayed ...
4
votes
0answers
17 views

How to check spotheight in closed polyline contour data using ModelBuilder or ArcPy?

I'm new in using ModelBuilder or Python script. So, i have a set of contour data and a good contour data should contain a spotheight* in every closed polyline contour data. Is there any solution to ...
0
votes
1answer
18 views

Multiple SQL Queries in One Search Cursor (ArcPy) [on hold]

I'm trying to make a search cursor which will take a compound SQL query, and while the search cursor continues to work, only the second part of the statement ("Population" >= 3000000) is being used to ...
1
vote
1answer
17 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
15 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
53 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
23 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
25 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
15 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
47 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
102 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
29 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
51 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
100 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 ...
0
votes
1answer
40 views

Is it possible to consume ArcGIS Hosted Table into local or ArcSDE geodatabase?

I would like to publish a table to our ArcGIS Online (AGOL) organization account. Is it possible to consume hosted features in AGOL to a local db or ArcSDE database connection? By consume I mean ...
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
52 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
27 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
78 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
29 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
34 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
56 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
118 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 ...