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

learn more… | top users | synonyms (7)

3
votes
1answer
28 views

Automate map symbology using varying input data in ArcGIS/arcpy?

I'd like to generate a series of maps, where each map displays graduated colors based on a different variable in the feature's attribute table. The geographic area is the same in each map. I'm using ...
0
votes
1answer
45 views

permissions problem with creating a new text file from the python interpreter in ArcMap? [closed]

I'm attempting to create a .txt file as the output from a larger python script I'm running within ArcMap. The code I'm having trouble goes like this: x = open('adfd.txt', 'w'), and my error message ...
0
votes
0answers
7 views

Map export templates locale

I have created a map export template, where labels and scalebar labels are shown fine when the map export service is published on gis servers where the windows language is english. However, when ...
0
votes
0answers
28 views

Offset and scale of netCDF rasters using Python and ArcGIS

I'm using the arcpy.MakeNetCDFRasterLayer_md command in Python to convert a netCDF archive into multiple rasters, one for each date. Below is a minimum working example of my code, that I've written ...
1
vote
1answer
74 views

Python for ArcGIS: Code refuses to accept a defined variable as input

I'm learning to use arcpy, and I am starting to try and script some geoprocessing tools. While trying to use arcpy.Select_analysis, I found that the code does not accept a defined variable as input. ...
0
votes
1answer
31 views

arcpy.Intersect_analysis using Geometry object as input

Is there a way to run arcpy.Intersect_analysis using an arcpy.Geometry object as one of the input datasets? I've tried different variations of the following, but I can't seem to get it to work. with ...
1
vote
3answers
68 views

Searching for changes of 2 layers based on geometry, Arcgis for desktop (ArcEditor

I´m trying to make a tool that would be able to compare 2 layers of any type (polygon, point, polyline) and find differences between them. Lets say i have a layer of roads (Polyline) from 2005 (layer ...
0
votes
1answer
34 views

access one feature at a time and do analysis

I am a bit stuck with my code right now. I have a two feature classes, one for schools, one for residential buildings. So far I have built a model with the modelbuilder, whichs works perfectly as well ...
0
votes
1answer
18 views

Changing coordinate system in which WMS is served using ArcPy?

I am trying to change the coordinate system of a WMS. what i have tried is: prjFile = lokaal + "opmeting_straatkolk.prj" sr = arcpy.SpatialReference(prjFile) mxd2 = ...
3
votes
1answer
183 views

“ ”.join(list) not inserting spaces when calculating field

I have a Python script where I'm trying to take the values from three fields (street address data - direction, street name, street type) and combine them into one field, e.g. S, Main, St should be S ...
0
votes
1answer
34 views

Monitor open sde connection

How can I monitor the open ArcSDE database connections without sdemon? I need to see at any time how many sessions are consumed from my app and if they are related to ArcGIS. I use Oracle 10.2.
0
votes
1answer
43 views

python addin manager validation of code

I have a toolbar (in ArcGIS) set up with two buttons using python addin manager, can someone help me make sure this works, when I run these buttons nothing happens. import arcpy import pythonaddins ...
1
vote
0answers
43 views

Arcpy cannot find shapefile attribute [closed]

I want arcpy to perform the following: load a shapefile, prepare to edit it, open its attribute table, perform a numpy.digitize using the values of a certain attribute and some bins provided ...
0
votes
4answers
77 views

Count Points on Points using arcpy

I have a point feature class which contains features scattered around the city, with some of the points intersecting other points. These intersecting features are correctly different features (they ...
0
votes
0answers
28 views

Mosaic Rasters Arcpy

I am trying to mosaic numerous rasters with the following code: import arcpy import os arcpy.env.workspace='H:\Sheyenne\Normalized_Indices\Fuzzy_Overlay' List1=arcpy.ListRasters('*.tif') ...
1
vote
2answers
70 views

Arcpy Calculate Geometry (coordinates)?

Does anyone know if it is possible to Calculate Geometry with Arcpy? I need to replicate the command > Right click field and Calculate Geometry except with Arcpy as I need to integrate this into my ...
3
votes
1answer
52 views

How can I overwrite files in a geodatabase (outside the workspace environment)?

I initially set the workspace environment to a directory and included the option, arcpy.env.overwriteOutput=True, but at some point in my script, I convert a shapefile in that directory to a ...
2
votes
0answers
45 views

Select IDLE 2.7 (not 3.4) as default script tool editor for ArcPy with ArcGIS for Desktop?

I'm trying to set my default editor in ArcMap (10.3) to IDLE 2.7, but despite using the 2.7 path, when I right-click on a script tool and select Edit, it opens IDLE 3.4:
0
votes
1answer
47 views

Arcpy 10.3 add ins [closed]

I am working with arcpy 10.3 and i want to build a add-in. Unfortunately it's not working when i add a button like: import arcpy import pythonaddins class ButtonClass1(object): """Implementation ...
0
votes
2answers
72 views

SetNull() failing with input raster in ArcPy?

In ArcGIS 10.3, I am trying to use SetNull to identify streams in a raster based on an existing flow accumulation raster. The process involves setting all raster cells with flow accumulation value of ...
1
vote
1answer
35 views

How to access script (source) of custom tool stored in tbx?

I have few custom toolboxes, with script tools. I can access individual toolbar by: ToolBar=arcpy.ImportToolbox(toolbar_path) I can access each tool by iterating through ToolBar.__all__ I’d like ...
3
votes
2answers
58 views

Table does not contain OIDs arcpy Error 000339

I have a script I'm working on that takes a SQL table view and performs a Table to Table (arcpy.TableToTable_conversion) If I leave out the Where Clause the Table to Table works flawlessly, however ...
0
votes
1answer
63 views

Having arcpy.da.SearchCursor access only selected row in attribute table?

In ArcMap 10.2, I'm attempting to build a tool that, when run, will iterate through a network of pipes to locate an outfall point. My network is composed of polyline data representing pipe, with input ...
2
votes
1answer
56 views

Updating MXDs with arcpy

I am trying to loop through a bunch of mxds in a folder and make some changes, in this case in particular I am trying to replace a text string. This should change all instances of "9/26/2014" with the ...
1
vote
1answer
34 views

In_memory workspace in geoprocessing services

I have a arcpy python script that runs a process that I publish as a geoprocessing service on ArcGIS Server 10.3.1. The python script uses various input feature classes. These feature classes are ...
1
vote
1answer
53 views

Calculate Field not saving on joined layer

I'm joining a table to a layer file, calculating a field in the layer and then removing the join. The code below runs with no errors, but when I check the field in the attribute table, nothing has ...
3
votes
2answers
117 views

Calculate Field - getting the code value but not the description

If STREETNM value are blank or _ then I want to replace them with the value of ST_DESIG. My code below returned the code value of ST_DESIG but not the description. How can I get the description ...
0
votes
2answers
81 views

Why does script only work if run twice? [on hold]

I have a simple script that I'm running as an ArcGIS tool that adds three fields and then calculates the fields based on expressions that derive information from existing fields. I'm struggling to ...
1
vote
0answers
59 views

Adding suite numbers to apartment building? [closed]

I wanted to know if there is an easier way to add apartment suite numbers to an apartment property? An example workflow of what I currently do to add a 400 level apartment building is add one point ...
0
votes
0answers
38 views

Return table names for query layers using arcpy

The dataSource property for layers does not return the name of the tables used in query layers. Instead, it returns something like the following: 'Database ...
0
votes
3answers
114 views

ArcPy Script Tool takes 30min - Ideas to accelerate the (raster) process

I developed an arcpy script tool that takes as input multiple rasters, a criterion to select specific cells from the raster which are then intersected with a point shapefile. At the end a value is ...
3
votes
2answers
27 views

Getting full path of empty sde feature datasets (Children property from arcpy.Describe object won't work))

My goal is to copy all the feature classes in a file geodatabase into an sde geodatabase, skipping those elements which already exist in the output sde gdb. Both geodatabases have the same feature ...
0
votes
0answers
16 views

Code to sift through many rasters and find rasters with errors using python [duplicate]

I would like a code to go through hundreds of rasters and print the names of the rasters that are problematic/don't work. I am trying to use the in cell statistics however I keep coming up with errors ...
1
vote
2answers
82 views

Translating ArcPy Commands to GDAL Equivalents? [closed]

I'm trying to figure out GDAL equivalencies to the following arcpy functions: arcpy.env.overwriteOutput() arcpy.MakeFeatureLayer_management() arcpy.SpatialJoin_analysis() arcpy.da.SearchCursor() ...
0
votes
1answer
24 views

Extract ASCII cells geographcal position

I have a task where I need to locate the geographical coordinates from a series of cells (indexed as row/column numbers) from an ASCII raster. How can I do that in Python or ArcGIS? I know the header ...
3
votes
1answer
48 views

Trying to create different sets of random points through ArcPy yet several of the files are duplicates?

I'm trying to create 50 sets of random point shapefiles in 37 different folders for a total of 1,850 random point shapefiles. However, upon running the script only a handful of sets are actually ...
1
vote
0answers
34 views

How do I edit stretched raster legend labels using arcpy?

I'm trying to edit a stretched raster legend item to only show values instead of the "High : " and "Low : " that are standard. I've created a layer template that doesn't include the high/low in the ...
1
vote
0answers
14 views

Is there a Guide to Translate ArcPy code to GDAL equivalent? [duplicate]

Due to cost-cutting measures I've been asked if I can migrate ArcPy code to a GDAL equivalent. I'm fairly new to GIS, ArcPy, and GDAL. Is there a website or guide which caters to providing ...
5
votes
1answer
53 views

Boolean test for file geodatabase having already been compacted?

We receive many 10.3 file geodatabases (fGDB) from a vendor. One contractual requirement is that the fGDB be compacted. Understandably we quality assure everything that comes in our door. Currently I ...
1
vote
1answer
67 views

Looping arcpy.mapping.updateLayers()?

I've got some problems with the following code, found on this answer to Is there a way to auto-update symbology between .mxds for the same shapefile? (Python?): import arcpy.mapping as mmap mxd = ...
1
vote
0answers
27 views

Installing Python/site packages on LAN server

I'm going to be sharing an ArcGIS script tool with coworkers and I want to store all necessary mxds, gdbs, and script files in one folder on the server so the file paths are absolute. However, the ...
1
vote
1answer
43 views

How does ArcGIS calculate zonal statistics with partially overlapping zones?

I am trying to get zonal statistics in ArcGIS. My zone raster is a world map with zones defined as "provinces (such as the US states)," and the value inputs are temperature data for each ...
0
votes
2answers
32 views

SpatialJoin_analysis with delimiter

SpatialJoin_analysis is not working with delimiter semicolon (;). It only worked with a comma delimiter (,) arcpy.SpatialJoin_analysis(Unique_Intersections, Streets_Unsplit, ...
1
vote
0answers
31 views

Merged Function doesn't function properly [duplicate]

I am trying to use Python scripts and merged my entry FCs in to the defined GDB. But, the system giving me the error that "ERROR 000735: Input Datasets: Value is required". The following attachments ...
0
votes
1answer
25 views

Unable to change default geodatabse with arcpy.env.workspace

Even after I set the path for the default database with arcpy environment variable, ArcMap does not change the default database directory? At first my arcpy.env.workspace looks like below: ...
2
votes
1answer
69 views

Finding problematic rasters in large set of rasters using ArcPy?

Just wondering if anyone knows how to quickly find rasters that cause errors when I attempt to process them in cell statistics (as I am trying to sum them). I have many hundreds of rasters and don't ...
-1
votes
0answers
45 views

Intersect analysis with xy tolerance

I'm trying to add a point at the intersection of these 2 streets. Intersect analysis with xy tolerance return no result. If I keep myStreet as original (no unpslit) then the xy tolerance worked. If ...
0
votes
1answer
56 views

Merge function doesn't have output for all FCs, It has just first FC

The attached file is my script for merging different FCs as they get dissolve and join by the input FC. I don’t know why the output for merge does not include all FCs. import arcpy, os from arcpy ...
-1
votes
0answers
22 views

Dissolve function response great but Join field doesn't include all Original (Joined FC) attributes

The attached file is my script. I am trying to do dissolve and join to the input FC along copy and create FCs. I don’t know why the output does not include all Joined FC fields. import arcpy, os from ...
-1
votes
0answers
47 views

Dissolve function doesn't include Dissolved field

The attached file is my script. I am trying to do dissolve along copy and create FCs. I don’t know why the output does not include dissolved field. import arcpy, os from arcpy import env ...