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

learn more… | top users | synonyms (1)

0
votes
0answers
5 views

Is there a PostGIS equivalent to the ArcPy.Slice function?

I have an existing system built on an 8.3 PostreSQL database which uses a ArcGIS - Spatial Analyst for a couple of raster operations. The system is moving to PostgreSQL 9.2 and I'm evaluating if the ...
0
votes
2answers
12 views

Convert jpg raster format to tif format

I have 120 rasters( jpg format ) and i want to convert them to tiff format to folder called "OtherFormat" in env.workspace with arcpy. In my code i try to convert all jpg file I read ...
0
votes
0answers
27 views

Calculating distance from PointGeometry object to polyline in arcpy

I created a PointGeometry object on ARCPY and I'm trying to measure the distance from that point to the closest point on a polyline table.. The PointGeometry object has an easy function for that ...
0
votes
2answers
21 views

Update Multiple Columns within One Update Cursor

Are you able to update several fields within an attribute table at the same item within one Update Cursor command. Code Example: with arcpy.da.UpdateCursor (fc, fields) as cursor: for row in ...
1
vote
1answer
15 views

Iterating through a point layer to create & sum distance rasters

I'm writing an Arcpy program to process data in a layer of several hundred points ('ptsLyr', from file 'ptsFile'), each of which has its own ID ('RecordID') and an associated value, 'radius', that I ...
1
vote
1answer
39 views

In ArcPy, How to call specific columns of attribute table?

I'm trying to figure out how to spline specific columns of a shapefile attribute table, but my question is intermediate to this-- how do I select a range of columns, e.g. the 20th column to the ...
1
vote
1answer
31 views

How do I enumerate the messages in arcpy.GetMessages()?

Messages are present in GetMessages() but it's a formatted string. I want to add some of my own newlines and alter the content on a per-message basis. How do I access the individual messages in ...
1
vote
1answer
20 views

Create Multiple Feature Layer and Add to MXD

I am really stuck with this one and cannot seems to get the code to execute. Every time I do so, I get the error: Input Features: Dataset [u'Test1'.....] does not exist or is not supported. My guess ...
3
votes
1answer
43 views

Can multiprocessing with arcpy be run in a script tool?

I have been tinkering around with the multiprocessing module to resolve some processing of data in ArcMap 10.3. I have created a script which works fine if I run it in IDLE. I see all my cores max ...
0
votes
1answer
22 views

Exporting list of tables contained in *.mdb with ArcPy gives Indentation Error?

I'd like to export to excel each of the tables in a .mdb database as separate .xml files. The code works until the last line which gives an unexpected indentation error, and I'm also struggling with ...
0
votes
0answers
46 views

Help with python, import update csv values to feature class fields

I am trying to update a bunch of field values from a csv file where there are existing (incorrect) values in my featureclass. After searching I came across a similar post (Help with Python Update ...
1
vote
1answer
28 views

Concatenating fields while also replacing values within certain stings [on hold]

I am trying to use python to concatenate multiple fields in a polygon layer. Specifically, I am attempting to combine the values of four fields into one: EXPCODE = !MATRIX! & !PLANT! & !PCT! ...
0
votes
0answers
49 views

trying to build world file for images based off extent rectangle generated from centroid in python

I have centroids for map images which I would like to georeference quickly and rougly via python script, using arcpy. I know the dimensions of the images, the dpi, scale, rotation and the coordinate ...
0
votes
2answers
29 views

Running Select results in error 000210

I'm trying to run SELECT in order to extract specific features under "CLASS_NAME", but continue getting "ERROR 000210: Cannot create output". I've searched though other questions with the same ...
0
votes
2answers
25 views

Arcpy reclassify label display issue

I have been looking for about 2 days and I can't seem to figure out or find a work around for the symbology labels after a reclassify when trying to automate maps. I run the following code and it is ...
-1
votes
0answers
24 views

Error importing ArcPy after Python upgrade?

Why i cannot import my arcpy in ArcGIS 10.2 python window after i updated my python 2.7.3 to 2.7.9, but i can use it after i run my ArcPy on python interpreter shell (outside ArcGIS), is there any ...
0
votes
1answer
44 views

Alter Fields in multiple feature classes in multiple workspaces

I have 22 geodatabases all in one folder. Each gdb has two feature classes. For each feature class, I need to rename a few of the fields. I've had success with this code, but it only works for each ...
3
votes
0answers
23 views

Automate Exporting of Rasters Using Renderer in ArcGIS

It is possible to export rasters in ArcMap by right clicking the layer-> Data-> Export: You can then click 'Use Renderer' check box to ensure the image you export uses the current ...
1
vote
2answers
55 views

Referencing layer in Table of Contents using ArcPy?

I'm looking for the best way to reference a layer in the TOC using arcpy and, if it is possible, that is different than the following: mxd = arcpy.mapping.MapDocument("CURRENT") df = ...
0
votes
2answers
35 views

Exporting gdb tables to excel in folder containing gdb?

So i have several folders which each contain a gdb. Now, I export the attribute tables of polygon feature classes using the following code (probably could use some optimization): folder = ...
0
votes
0answers
14 views

Failed to execute (ExtractByMask)

I use ExtractByMask of arcpy to isolate to subset the provinces of the Philippines. I do it with this code. import arcpy from arcpy import env from arcpy.sa import * ...
2
votes
2answers
183 views

Running Python script in Task Scheduler— Script will not run

I have a script which I wish to run on a regular monthly basis without me needing to open and run the it. I have referred to every web page I can find on Windows Task Scheduler and followed their ...
1
vote
1answer
58 views

Python encoding error in ArcPy

I am writing a JSON file, as string input, using python, into a .json file in the file system. However I am getting the following error sometimes and I don't know why. Any ideas? ...
0
votes
1answer
32 views

Arcpy.Buffer_Analysis Does Not Create Feature Class

import arcpy arcpy.env.workspace = r'c:\data' fcs = str(raw_input('Please enter the layers you would like to buffer: ')) dist = str(raw_input('What would you like your buffer distance to be? ')) ...
0
votes
0answers
51 views

ImportError: DLL load failed: %1 is not a valid Win32 application

In my system python 26 is installed for arcgis10.0 and python 27 for 64bit is installed. Both are working fine individually. Now, i want to import arcpy from python window, but failed. Now the error ...
4
votes
1answer
78 views

Reclassification of raster

Is there a better way to do this? I'm trying to create a script that will change classifications of a raster to: 0 for: 0,7-9,15-20,40,62-63,73,78-87,89-130,132-151,153-175,177-203,215,228,251-253 ...
0
votes
1answer
58 views

Geodatabase affecting outcome

Why does my naming convention change depending on where the output is saved? When I save this to a .gdb, the name of the output is "tif", not final_mosaic.tif. When I save the same output to a ...
1
vote
1answer
18 views

Clipping a Raster into 5x5(25) equal tiles through the use of arcpy?

I am curious to find our if there is a way to create a python code that enables you to clip a raster into equal parts example: 5x5(25) tiles with the use of arcpy? From what I can think of you would ...
0
votes
0answers
21 views

How do I lookup a value in a list?

I have a list of points populated with a da.SearchCursor. This list is used to lookup additional values from the next step. This would be akin to SQL join. listOfPoints= [] with ...
0
votes
1answer
48 views

ArcPy Script to update LYR data source not identifying all layers in folder

I've put together a script that for the most part works as intended - to walk through a series of folders, find SDE layer files and update their data source to direct connects if the layers support ...
2
votes
1answer
30 views

ClipRaster with three inputs

1) How can I clip raster with checked "Use Input Features for Clipping Geometry? I don't want to specify X, Y Min/Max for the Output Extent. I want to run a simple Clip Raster script that includes 3 ...
0
votes
2answers
32 views

SaveToLayerFile failed - “value is not a layer”

Tried doing a SaveToLayerFile on a layer in a workspace, but it confusingly says it's not a layer. I know it is a layer because the script can access lyr properties (e.g. name) and all of the ...
1
vote
0answers
51 views

Loop exits after 100 count while creating domains using python [on hold]

I am trying to create domains on feature class or table class by reading a table which holds all look up information. Following is example code for what I am doing: tableIndex = ...
1
vote
1answer
33 views

Adding extra characters to elements in a list [closed]

I am trying to create a script that automates the generation of a MXD. It does this by the user copying and pasting several variables, running a definition query and exporting an MXD. I can get the ...
0
votes
3answers
64 views

Using arcpy outside the arcmap

I want to use some arcpy function outside arc map i used following code but it ends up with error no module named arcpy can anyone help import sys sys.path.append("D:\Installed ...
0
votes
0answers
38 views

Arcpy save command giving errors

I've been trying to get this to work but for some reason it just keeps failing. Here is a very simplified version of my script: import arcpy arcpy.CheckOutExtension("spatial") #Spatial Analyst ...
0
votes
1answer
44 views

Print values of a field in arcgis using python [closed]

I am pretty new at python scripting and I am trying to print values of a field to screen. My code is that import arcpy layer = arcpy.GetParameterAsText(0) arcpy.AddMessage('Layer Name : '+layer) ...
0
votes
0answers
14 views

script to Determine Parcel Neighbors [duplicate]

I have a layer of Plots Urban planner I want to fill the neighborhood north and south, east and west of each piece fields i need script to Determine Parcel Neighbors using PYTHON
4
votes
2answers
229 views

How to create proprietary tools for ArcGIS?

I want to build a some tools for ArcGIS. Toolboxes that I've seen are open source and run the scripts that reside in their src folder. However, I don't want to release the source code. After some ...
3
votes
1answer
81 views

How do I import specific fields from a shapefile?

Using arcpy, how do I import only select fields from a shapefile? Or, if I must import the entire shapefile, how do I delete certain fields after import?
1
vote
1answer
35 views

Parameters not valid in batch Alter field Arcpy

I am trying to perform a batch of Altering field names through a stand alone python script using Arcpy but it seems I am making a basic mistake in my python code. Using a list I refer to the original ...
0
votes
1answer
31 views

When importing a shapefile, resulting field name in feature class contains schema and table name

I'm using the following snippet to import a shapefile into a SDE feature class. arcpy.CopyFeatures_management(inputShapefile, outputFeatureClassName) where inputShapefile is a shapefile on a mapped ...
1
vote
1answer
28 views

AddLayertoGroup

I've been using ArcGIS 10.0 to create arcpy scripts. Now that I'm using ArcGIS 10.2, I try to run those scripts in the new environment but I get some errors. One of them is the following one, that I ...
1
vote
1answer
33 views

The truth value of a raster is ambiguous. Invalid use of raster with Boolean operator or function.

I'm having trouble with an if/else statement in my for loop. I have a raster Vmax with a constant value, another raster V which has a value of 0 in the beginning and will change during execution of ...
1
vote
1answer
22 views

ArcGIS OSMLoader arcpy .encode error

I am trying to load a geofabrick .bz2 file into a file geodatabase using the OSM Simple Loader tool from http://arcscripts.esri.com/details.asp?dbid=15137 However it fails each time at this line: ...
2
votes
2answers
38 views

Updating the Z value within an XYZ.txt file

Following a post from a few weeks ago: Creating polygon from 2 txt files (Parent ID + Coordinates) and thanks to the help and code, the script works very well. Now I need to reverse the process in ...
3
votes
1answer
132 views

Is it possible to run ArcToolbox without ArcMap?

I am following the accepted answer for the question: Batch conversion of netCDF to Raster in ArcGIS using Python, obviously, to convert netcdfs. The code taken from the above answer (pasted below) ...
0
votes
0answers
40 views

Object: Createobject Layer Invalid Data Source

I'm using a tool made for ArcGIS, however I keep getting this error (see picture). I do not know any python code and I'm trying to get this script to run. # Import system modules import sys, ...
0
votes
0answers
20 views

Average cell value within polygon for each raster in a mosaic dataset - ArcGIS

I am working with a mosaic dataset that has the following properties and attributes... It consists of 365 rasters, each representing a day of the year. I am needing to get the average of the ...
1
vote
1answer
25 views

Print webmap to geospatial pdf

I am looking for a solution for this with no success using: result = arcpy.mapping.ConvertWebMapToMapDocument(Web_Map_as_JSON, templateMxd) AND arcpy.mapping.ExportToPDF(mxd, Output_File, ...