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

learn more… | top users | synonyms (7)

-3
votes
0answers
17 views

Where clause works with value but when replace by variable it doesn't work [duplicate]

I have my script with searchCursor below. When I'm running it, it works with values 'Avenue Ruel' and 119 as you can see the result after print statement but when I'm replacing them by their variables ...
3
votes
1answer
65 views

Change Map Title Block Information through ArcPy

I am new to python, but I'm currently working on a script tool to loop through all MXDs within a folder and change their associated title block information(Map Title, Report Title, Date, Charge Code, ...
1
vote
0answers
34 views

Creating button on Python AddIn toolbar to run python script when clicked? [closed]

I need to create a button on toolbar of arcgis 10.2 who run a python 2.7 script created before when I click. Then I need to know if it's possible in this button that script write results to an excel ...
2
votes
1answer
30 views

save as Layer script not working

I've created script in Python for ArcGIS to save shape file as layer file..the code throws an error ERROR 000732: Input Layer: Dataset D:\core i 5 data\symon assignment\Swat\clipped\buffer.shp ...
-1
votes
1answer
47 views

Insert Cursor not creating polygon

I used this code to create a polygon in my map, but the polygon isn't showing up anywhere. Does anyone know why? Here is my code: fc = "U:\BuildingFootprints.gdb\BuildingFootprintsCopy" cursor = ...
2
votes
0answers
37 views

ListFeatureClasses isn't returning anything in GDB [closed]

I am writing a script that performs a series of operations on line, point, and polygon files in my file geodatabase matched through a unique number in their filenames. My geodatabase looks like this: ...
0
votes
0answers
41 views

Arcpy expression using date field and today's date?

I would like to create an expression similar to the following to incorporate into the arcpy.SelectLayerByAttribute_management function. It's not correct, I just wrote down what I would like it to do. ...
3
votes
1answer
54 views

Transfering features class from ArcSDE to File Geodatabase using ArcPy?

I would like to know if it's possible to use python to transfer features class from SDE into a GDB and then transfer it back to SDE without losing SDE parameters such topology, versionning, ...
1
vote
2answers
28 views

Add raster attribute table to raster using arcpy

I have downloaded US soil raster data by state from https://gdg.sc.egov.usda.gov/GDGOrder.aspx at 10m resolution. I am now trying to add a modified raster attribute table to tif that was exported ...
1
vote
2answers
39 views

Arcpy Reclassify by Standard Deviation

I would need some help with the Reclassify tool. I have written a script that produces rasters which I need to reclassify. My problem is, I want the values to be reclassified by standard deviation ...
2
votes
2answers
70 views

Update Cursor for automation of tedious data entry which keeps crashing ArcMap

I coded the Update Cursor for automation of tedious data entry where I am applying a previous Survey Company Identification Data to STRUCTURES_15096.shp from "OFFICIAL_STRUCTURES2015.shp" and it keeps ...
0
votes
1answer
34 views

How to list features “in_memory”

I have a script that creates a number of features "in_memory." Once I have them in memory I need my script to create a list of everything "in_memory" - I'm not sure how to achieve this. Is anyone ...
0
votes
0answers
21 views

Save update feature class (Python toolbox)

I created a Python Toolbox tool to reorder fields I am trying to save the feature class determine path,any advise? here is acode I'm trying: import arcpy import os class Toolbox(object): def ...
1
vote
4answers
70 views

Run a model in arcpy

I have been looking at ways to run a ArcGIS model directly in arcpy, without having to export it and correct all sorts of things in the code. But somehow I can't seem to make it work. This is how I ...
0
votes
1answer
56 views

Spatial Reference not working with If-Else

I'm attempting to use a script to check a folder of data sets to see if they match a projection of another data set in a target folder. I need to be able to re project any that don't match the same ...
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
30 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
184 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
78 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
71 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 ...
3
votes
0answers
46 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
48 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
75 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
59 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
64 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
35 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
118 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
82 views

Why does script only work if run twice? [closed]

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
60 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 ...