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

learn more… | top users | synonyms (1)

0
votes
0answers
29 views

Calculate Lat/Long in decimal degrees

I'm trying to calculate the location of several points in a python script. However, the Add XY tool is in feet, rather than decimal degrees. The following Calculate Field lines just cause an error ...
0
votes
1answer
19 views

Error 000177: Failed to create relationship class in Python

I am trying to use python to create a relationship class between a feature class and dbf. I keep getting, "ERROR 000177: Relationship classes can only be created in the same database that ...
2
votes
1answer
20 views

Replacing layer ArcSDE connection

I am very new to using Python... I have an MXD with all of my layer files in it. They are grouped by category etc. Each layer file references a dataset within my SDE. My SDE has two different ...
0
votes
0answers
11 views

How to change features to have unique symbology color? [duplicate]

Say I have many features which need to have unique symbology color, how can I do this in ArcGIS 10.1. Possible using Python script? or Just simple tool in ArcToolBox.
1
vote
0answers
35 views

Are there any Python scripts available for Hydrology to compute watershed Basin from csv file?

Let's say I have surface data available in CSV format (x,y,z). In order to create a watershed basin from surface data, there are some intermediate steps we need to follow. ASCII to surface raster ...
0
votes
2answers
23 views

Iterating list returned by arcpy.ListFeatureClasses() gives error 'NoneType' object is not iterable?

I have the following code, where i write from a list of featureclasses the fisrt row of 2 specific fields to a text file. But when i run it either erases all the previous stored data from text or ...
1
vote
1answer
17 views

Python script to accumulate flow volumes for a pipeline geometric network

I have a point wells layer and a polyline pipeline layer. The wells are snapped to the end of the pipeline segments. The wells layer has weekly updated flow volumes and I'd like to find a way to ...
0
votes
1answer
16 views

MERGE/ COMBINE two ADJACENT CONTOUR-LINES with Python

I am a python begginer; I found a script that "BARBOSSA" posted in the "blog" ( Append or merge consecutive line segments (contours) as one single line of the same elevation value) I am trying to use ...
1
vote
2answers
47 views

Using lists to work with feature classes having different spatial references in ArcPy?

This is my first arcpy script attempting to use lists. Input: 4 dif Excel files, each with a dif spatial reference Output: 4 dif feature classes (in same geodatabase), each with original spatial ...
0
votes
1answer
28 views

Error using UpdateCursor to copy a GlobalID field

I am trying to use an Update Cursor to copy a GlobalID field into a string field. However, I keep getting an error saying "Objects in this class cannot be updated outside an edit session [Medians]". ...
2
votes
1answer
28 views

problems overwriting files in ArcSDE with python script

I'm having a great deal of difficulty overwriting files when using ArcSDE. The usual 'arcpy.env.overwriteOutput' method doesn't seem to work. When I run this script: import arcpy from arcpy import ...
0
votes
0answers
35 views

Checking for overlaps using python

Trying to write a code where python checks for overlapping polygons within a file geodatabase in the current mxd and basically prints the feature class names overlapping. Here is what i have: import ...
1
vote
0answers
23 views

Clipping Feature Classes by Data View Extents with ArcPy?

Have a fully functional script about 90% of the time. It is that 10% that is really bothering me and I cannot seem to deduce a solution. Script will take the user defined dataframe view extents and ...
1
vote
0answers
27 views

Update Data Driven Pages Index layer via Python

I am trying to find a way to update the index layer for data driven pages through arcpy. I understand that to access DDP from arcpy.mapping you need to be referencing a MXD that has DDP enabled. My ...
0
votes
2answers
60 views

Troubleshooting ERROR 000814: Invalid file type from arcpy.TableToExcel()?

I wrote the script below to iterate through a file geodatabase's feature classes and convert them to an excel table. However, it returns the error ExecuteError: Failed to execute. Parameters are not ...
-4
votes
1answer
59 views

Python script working incorrectly?

i am writing script which uses different Tools of arcgis and implementing different functionalities .. My script consists in different Functions running in an order. Each function is connected to ...
1
vote
4answers
41 views

ArcPy merge using a list from GetParameterAsText

I am pretty new to ArcPy so bear with me. I am having a hard time understanding how to feed a list of FCs from a "GetParameterAsText" into something like the merge tool. I have my GetParamterAsText ...
1
vote
1answer
25 views

Accessing bands in .pix (PCIDSK) file in python/arcpy

I am trying to perform zonal statistics on a single band from a multi-band raster in .pix format. I have things working great with a tiff file. I am able to access the bands using this code: desc = ...
1
vote
0answers
30 views

Intermittent exceptions in CopyRows_management

Occasionally, but frequently enough to be a pain, my script throws an error. The script runs fine most of the time but when it fails, I get this: Traceback (most recent call last): File "XXX.py", ...
0
votes
0answers
10 views

How to call the Manage Map Cache Tiles tool hosted by default in the system folder of arcgis server. I am getting ERROR 001428

When I am trying to call the GP tool Manage map service cache tiles that is hosted on the arcgis server by default in the system folder, I am geeting the followning error: ERROR 001428 Failed to ...
0
votes
2answers
45 views

Repair/Check for empty geometry in ArcSDE?

I understand that the standard validation/repair tools are not for use with ArcSDE and that ESRI needs to fix this, but are there work-arounds for at least checking where there might be empty geometry ...
1
vote
1answer
44 views

CSV to ArcGIS table, insufficient text field length

I currently use arcpy.TableToTable_conversion in order to convert a CSV file into an ArcGIS file geodatabase table. This works when string length is less than or equal to 255 characters. Whenever 255 ...
0
votes
0answers
21 views

Checking if Terrain Model has pyramids or data sources using ArcPy/Python?

I asked this question in the Esri forums and got nothing but a lesson on LAS point cloud classifications—not even remotely what I had asked. I’m hoping someone here can point me in the right ...
-1
votes
0answers
8 views

Add feature class from different geoodatabase to a single mxd [duplicate]

I need to add multiple feature class from different geoodatabase to a mxd and then change to same colour and making a definition query to it. The naming of all feature class are end with ppt. Is ...
0
votes
0answers
24 views

How to add multiple feature classes from gdb to mxd using ArcPy? [duplicate]

I'm using ArcGIS 10.2 and I am trying to to add multiple feature classes (eg. c101ppt, c102ppt, c103ppt... [name end with ppt] from a geodatabase to a mxd. The name of feature layer need to be the ...
1
vote
1answer
18 views

Changing Mosaic Dataset Properties in Map Document using ArcPy?

Does anyone know if it is possible in ArcGIS 10.3 for Desktop to access and change mosaic dataset properties within a map document using ArcPy? I am trying to write text into the symbology ...
0
votes
0answers
25 views

Select Visible Rasters (Mosaic Datasets) using ArcPy?

I am wondering if anyone knows if there is arcpy functionality available in ArcGIS 10.3 or can be coded easily to replicate the select visible rasters command (manually right clicking on a Mosaic ...
0
votes
0answers
23 views

Computing Area Weighted Average on Rasters Using Raster to Polygon

I am using ArcGIS 10.3 for Desktop. I am trying to compute area weighted averages for polygons in a shapefile using values in a single band raster data set. The approach I am taking is that I am ...
0
votes
1answer
22 views

Zonal Statistics as Table output is missing some polygons ONLY when run from Python script

I have a raster file from which I am attempting to calculate mean values for polygons defined in a shapefile. Using the Zonal Statistics as Table tool from within ArcGIS works great. My shapefile ...
0
votes
1answer
42 views

How to check for empty string?

I am running a loop to go through tables of a database's feature classes to rewrite the URL links that are currently in the records. The first elif statement is to check whether there is an empty ...
-1
votes
1answer
25 views

NumPy Array to Feature Writes only first array object to feature class

I am consuming a json web-service with NumPy Array to Feature, I have many nested try/except blocks to consume the data/find errors/etc. The script is functional, however I am having trouble seeing ...
3
votes
1answer
86 views

Can I project a single set of coordinates that are not in a table or feature class with arcpy?

I have been searching for the easiest way to convert a single set of State Plane Coordinates (in units of "Feet") to Decimal Degrees using arcpy. All the methods I have seen so far involve one of the ...
3
votes
1answer
107 views

Is there a quick way to see the fields in a table via arcpy?

I frequently find myself in Python debug mode, trying to examine the fields of a layer or table. arcpy.Describe(lyr).fields returns an array of <geoprocessing describe field object> which isn't ...
0
votes
1answer
15 views

import arcpy failed Python 2.7 with ArcGIS 10.3 64-bit Background geoprocessing RuntimeError: NotInitialized

I want to run a python script that uses arcpy. It was running earlier on a 32-bit machine without problems. On a 64-bit machine I get a MemoryError. The 64-bit backgroundgeoprocessing of ArcGIS 10.3 ...
0
votes
1answer
18 views

How to publish the Manage map server cache tile (Server) tool as an arcGis geoprocessing service?

I need to publish the Manage map server cache tile on the arcgis server as a geoprocessing service. As a result I will be able to update the tiles of a tiled service through a service call. I face ...
0
votes
0answers
13 views

Problem with schema synchronization using Import Replica Schema (Data Management)

I want to synchronize the schema of replica. The steps I am following is documented in ArcGIS Resources: Export the geodatabase_1 replica schema using Export Replica Schema (Data Management) tool. ...
0
votes
1answer
63 views

How to automate ArcGIS map production using Python?

I have this layout; it's a map that I divided it to 25 parts using FISHNET from arctoolbox. I want to prepare only one layout and then using a Python script I want to be able to automate the ...
1
vote
1answer
48 views

How do you use Windows folders as acrpy Parameters

I am having problems trying to perform simple folder management operations in an ArcGIS python toolbox. First here's some code snippets (I have left out all of the stuff that does not pertain to this ...
0
votes
1answer
21 views

Repairing a broken data source for a single layer in multiple map documents

I am a Python newbie and I'm trying to repair the data source for an aerial raster in close to 50 individual map documents. My supervisor deleted the 2014 recently and uploaded the 2015 in its ...
0
votes
1answer
24 views

Re-Calculating Rows in File GDB Feature Classes

I run the script that I created below, but when it is completed and I check the FC tables, nothing has changed. The script iterates through each feature class of a database and then iterates through ...
-3
votes
0answers
91 views

Getting value from arcpy.GetParameterAsText?

I have a point shapefile with the following columns mosaic hypo result condition 2000 1700 1500 1000 980 . . AND i want to write a script that will do the following: ...
1
vote
0answers
44 views

Automating creation of ServiceDefinition from Python toolbox of ArcPy without broken project data source?

Summary: I can create a ServiceDefinition through ArcCatalog or ArcMap, but when I try to generate the ServiceDefinition through python, it does not copy the /data folder with it, thus the script ...
1
vote
1answer
29 views

ERROR 000157: Input and target dataset should have the same number of bands. Failed to execute (MosaicToNewRaster)

This is just a continuation of my former post:Batch Mosaic Rasters: arcpy.MosaicToNewRaster_management (ERROR 000628: Cannot set input into parameter coordinate_system_for_the_raster) --where I batch ...
1
vote
1answer
24 views

why there is no attribute like 'GetNAClassNames' in my arcpy

I want to do a network analysis, when I want to load a layer as a barrier using arcpy.na.GetNAClassNames, the message is like this: AttributeError: 'module' object has no attribute 'GetNAClassNames' ...
0
votes
1answer
19 views

Batch Mosaic Rasters: arcpy.MosaicToNewRaster_management (ERROR 000628: Cannot set input into parameter coordinate_system_for_the_raster)

I am trying to batch mosaic rasters using arcpy.MosaicToNewRaster_management in arcpy: #This is for mosaicking a lot of rasters import arcpy from arcpy import env ...
-1
votes
0answers
34 views

Using ArcPy to display result shapefile with layer symbology?

I am using an ArcPy script, and everything is working perfectly except the display of the result shapefile file. What is the best solution to display the result? In the end I would like to share ...
0
votes
0answers
46 views

Creating a custom toolbox and python script to analyze fire data

My goal is to create both an ArcGIS toolbox and an independent python script to do the analysis of fire occurence in the Southwest (by season) through ArcMap as well as independently with python. I ...
0
votes
1answer
48 views

Failed to execute (RastertoPolygon) Syntax error at or near symbol SPACE

I'm converting series of raster to polygon using RastertoPolygon in arcpy. #import the module import arcpy from arcpy.sa import * from arcpy import env arcpy.CheckOutExtension("Spatial") ...
1
vote
2answers
48 views

How to generate random points from FIDs using ArcPy or ArcGIS Field Calculator?

I'm trying to generate a shapefile of random points using FID from the attribute table. My attribute table has 800,000 features and I only need a sample of 240. Is there a way to do it in arcpy or in ...
-3
votes
0answers
47 views

Installing ArcPy on Mac?

I want to use an answer from Batch shapefile merge, with adding and calculating field to create a merge of 50 shapefiles but I only have a Mac. Is there a way to install ArcPy on my Mac so I can ...