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

learn more… | top users | synonyms (1)

0
votes
0answers
7 views

Automating Viewshed Analysis for 100+ points in ArcGIS for Desktop or QGIS? [on hold]

I am looking to create a script or some sort of work flow to analyze the viewshed of 100+ points (in a .KMZ file) using either ArcGIS 10.3. I can also download and use the most recent version of QGIS, ...
0
votes
1answer
218 views

Optimizing ArcPy code to cut polygon?

There is a lot of nested loops and wondering of ways I could speed up this code? Any ideas? Note: This requires ArcMap 10.2 def cut_geometry(to_cut, cutter): """ Cut a feature by a line, ...
2
votes
2answers
139 views

Can we no longer reference an ArcMap layer to get the spatial reference?

I'm currently using ArcGIS 10.2.1. In previous custom geoprocessing tools, I've used the following code to create a feature class in-memory, and set the spatial reference using an existing layer in ...
0
votes
1answer
305 views

Spatial ETL Tools won't run “AttributeError: 'module' object has no attribute, etc.”

I have a python script that runs 5 Spatial ETL tools that I wish to run as a scheduled task. Each of the tools will run successfully from ArcCatalog and also from the ArcCatalog Command line. If I ...
3
votes
2answers
78 views

Accumulated value from many rasters python/arcgis10

I need to calculate an accumulated value of temperature (as an additional raster) from many rasters. Is there any option to do this in ArcGIS 10 or any hints for a python script?
1
vote
0answers
17 views

How to correctly input complex multiband functions in Raster Calculator?

I'm trying to compute a MTVI2 (Modified Triangular Vegetation Index - Improved) and EVI (Enhanced Vegetation Index) from Landsat 8 imagery. My formulas are as follow (I'm using ModelBuilder): MTVI2= ...
1
vote
1answer
101 views

Error Creating Feature Layer from Parcel Fabric, Error 000732

Currently I am writing a python script that creates a feature layer from our parcel fabric and then appends that data into a different SDE feature class. The problem is that when executing ...
1
vote
1answer
745 views

Why does copying ArcSDE datasets and features in Python give ERROR 000732 & 000735?

I keep getting a kick back that says this: ERROR 000732: Input Features: Dataset 'Database Connections\Wyoming.sde\Supporting_MT_DBO_Geology' does not exist or is not supported Failed to execute ...
2
votes
2answers
442 views

CopyRows_Management in ArcPy gives ERROR 000732?

I get the following error when running a CopyRows_Management with Python (ArcGIS 10.1): ERROR 000732: Input Rows: Dataset \MyConnection.odc\MyTable does not exist or is not supported Here is the ...
5
votes
1answer
418 views

Error using con in Map Algebra in Python script

I am experiencing a painful problem in the middle of a Python script I am writing. When I get to a Map Algebra function, I have tried two different options and both return a different error. At first ...
1
vote
1answer
30 views

How to select layer of .shp format by attribute using ArcPy?

I have to first load a vector layer (in .shp format) in arcmap and then it should select to specific attribute (the name of attribute is taken as input from user which i have done). and only selected ...
4
votes
1answer
71 views

Automatically create new layers from a single dataset using definiton query for unique values in a field

I would like to automatically display a featureclass as different layers based on a specific field. I've seen a few tools online and on XToolsPro under the category of Split by Attributes, but they ...
1
vote
1answer
27 views

Update Cursor with Date Issue [on hold]

My dates (maxDate, minDate, avgDate) all print out with the correct datetime format, but I am unsure if the problem is how the loop is written to update the cursor. Error: line 102, in updateRow ...
1
vote
0answers
22 views

Graph/Network building and analysis of linked polygons in ArcGIS 10.2

This is more of a follow-up question to Divide polygons into *n* number of groups of equal counts with ArcGIS 10.2 and grouping village points based on distance and population size, particularly the ...
1
vote
0answers
38 views

Python script changing ArcSDE data source not updating all MXDs?

We recently made significant changes to our ArcSDE database setup by splitting our original database into five databases and renaming most of the feature sets. Right now I have a script that opens all ...
1
vote
1answer
24 views

Using WK ID's when using CreateSpatialReference tool

I recently found out how to create specific spatial reference objects and add them to my arcgis python standalone script. ...
3
votes
1answer
75 views

Match features that are spatially similar with ArcGIS?

I'm hoping there might be a way to match features from one feature class to features of another feature class that are the most spatially similar. I have two datasets representing the same thing but ...
2
votes
2answers
29 views

How to calculate field as a substring of another?

I have a text field, field1, that's populated with 14-digit identifiers, like "01234567890123". I create a new field, field2, that I want to show the first four digits of field1. I would like to do ...
0
votes
0answers
45 views

MS SQL table with geometry field to feature class

I have a table in a native SQL database (no geodatabase, dc_geobank_public.sde in the code) with cca. 300 000 records and 18 fields. Two of the field contains projected X and Y coordinates, and one ...
2
votes
1answer
20 views

Parameter to script tool gives Invalid expression ERROR 000358?

I have created python script tool in arcgis 10.1 as below. I am trying to take input parameter and passing to select statement. There is error when i execute this tool. import arcpy from arcpy ...
1
vote
1answer
99 views

SQL within Python Script to get only part of the expression by GetParameterAsText

I was wondering if anybody could help me. Im trying to create a tool within ArcMap using a python script. Within the script i've been trying figure out how to change it so that I only need to get ...
0
votes
0answers
75 views

Select By Attribute sql problems [duplicate]

Having trouble with this python code. I keep getting a ERROR 000358: Invalid expression" code for the select layer by attribute management statement towards the end of the code. Moved the data to ...
1
vote
2answers
39 views

Getting number as parameter to use in SQL expression leads to ExecuteError: ERROR 000358?

In my script I am using the Select tool (arcpy.Select_analysis) and in the SQL expression, I want to use a number that I call in as a parameter. I have trying to script it like: subsize = ...
2
votes
2answers
154 views

Trying to use an integer in a WHERE clause

I'm trying to use an integer value in a WHERE clause (looking at an integer field). expression = "'SERVICE' = 'Service' " expression = expression + 'AND ' expression = expression + "'GPS_TIME_TOTAL' ...
1
vote
1answer
78 views

Debugging ERROR 000358: Invalid expression from SelectLayerByAttribute?

I'm creating a script tool and using the SelectLayerBy Attribute function (below), arcpy.SelectLayerByAttribute_management("cities_lyr", "NEW_SELECTION", '"CRIME_INDX" <= 0.02') However, I keep ...
0
votes
2answers
882 views

What causes ExecuteError: ERROR 000358: Invalid expression Failed to execute (SelectLayerByAttribute) on shapefile? [duplicate]

My script runs perfectly for feature classes, but not shapefiles. It crashes at the point of selection, provided there is a query. gp.Workspace = "C:/someworkspace" fc = "featureclass.shp" query = ...
3
votes
3answers
761 views

Runtime error : ERROR 000358: Invalid expression using SelectLayerByAttribute in ArcPy?

I cannot for the life of me persuade SelectLayerByAttribute to work (I need to automate this for a complex script). Working in ArcMap's python console on already loaded shapefile, the format below: ...
3
votes
1answer
107 views

How to iterate through all geometries using a search cursor?

I would like to use a python add-in which uses a button click to iterate through each selected polygon one by one. The following code manages to zoom only to the first polygon. How can I adapt it to ...
1
vote
0answers
21 views

Moving a Map Service Group Layer out of a Group Layer with ArcPy

I am struggling to move web services (tiled basemaps) out of group layers into the data frame. I've used arcpy.mapping.ListLayers to compose a list of layers, then I've ascertained what is a group ...
2
votes
1answer
16 views

Automating update of network dataset in ArcGIS Server

I am trying to set up an automated process that does a nightly extract of the network dataset from SDE and publish to: ArcGIS Server 10.3 as a network service fGDB as network dataset It seems ...
0
votes
0answers
36 views

Using Arcpy to Update Data Source Does Not Update Related Tables

I have a python script that updates the data source of mxd's from staging to production. Here is an example of the code: import arcpy mxd = arcpy.mapping.MapDocument(r"C:\Project\MyMap.mxd") for lyr ...
0
votes
1answer
31 views

find all the null records for all fields in a shape file

I figured out that I can use field calculator on a single column in arcgis 10.3 attribute window as follows: def RemoveNULL(x): if x is None: return '' elif x == '': return ...
2
votes
2answers
379 views

Calculating surface using Lambert correction?

i'm using lambert conformal conic , so we have distortions along any given parallel , i would like to get the area used to solve this distortion. I have calculated the area using Shoelace formula , ...
2
votes
0answers
22 views

I have a large dataset of lakes, which I want to group into n clusters, based on a target total amount of perimeter they have. Suggestions?

There's a longer explanation of why I'm interested in this below, but in short, I'm wondering how to run something like a k nearest neighbors formula, with the number of groups determined by a maximum ...
13
votes
1answer
2k views

How to make a separate Python installation that can call ArcGIS' arcpy?

I see a lot of threads asking how you can create a separate Python installation (e.g. the Anaconda or Python XY distribution) that can use arcpy, while not 'breaking' the original ArcGIS python ...
2
votes
1answer
48 views

Looking to find (or build) a particular Python geoprocessing tool

So here is my situation: There is a large area (a wildlife refuge) of nearly 200,00 acres that we have loads of spatial data for, from habitat management projects from the past several years. My boss ...
5
votes
1answer
84 views

Cutting a circular buffer via Arcpy

I am currently working with compressor stations on centerline routes. These compressor stations have a 3 mile buffer surrounding them. I wish to cut a portion of the circular buffer off. These cut ...
0
votes
0answers
11 views

Common Tasks on ArcGIS Server REST service

I have a published REST service with lines in it. If I have the permissions to edit the service in ArcMap, shouldn't I be able to perform a arcpy.Dissolve_management on the lines (client side) to ...
0
votes
0answers
16 views

Using a Value Table to Calculate Multiple Fields

I'm looking to develop a tool (ideally through model builder as my python writing ability is not stellar) that creates a simple user interface that has dropdown menus for desired fields of a selected ...
2
votes
1answer
36 views

Alter Field character limit incorrect

I'm having trouble with the Alter Field Data Management tool -- it will not allow me to create a field name longer than 31 characters. The table I'm using is a File Geodatabase table, where the ...
1
vote
1answer
32 views

Directional Spatial Join with Python - Arcpy

Using Python, I want to join one point feature (centroid node) to the closest 4 links (polylines), but spreading the search in the 4 directions around my point, so that I have: 1 centroid-link ...
1
vote
0answers
29 views

How do I data page with arcpy?

I have a enterprise SDE feature class and need to retrieve its data. Attempting to copy all the data at once appears to be problematic. How do I take a feature class and split up the data retrieval ...
1
vote
1answer
36 views

How to troubleshoot a hard crash on CopyFeatures_management()

I have a script that uses arcpy.CopyFeatures_management(FEATURE_CLASS_SDE, FEATURE_CLASS_LOCAL) to copy a feature class from our enterprise SDE to a local file geodatabase. For the most part, it works ...
1
vote
1answer
706 views

Why does CON statement give ERROR 010240: Could not save raster dataset to (value) with output format GRID?

I am receiving the following error when trying to run the following code: import arcpy from arcpy import env from arcpy.sa import * arcpy.CheckOutExtension = "Spatial" env.workspace = ...
0
votes
0answers
32 views

Adding Array of strings in File geodatabase feature-class' field

I need to include array type in file geodatabase/shapefile field's content so that when i expose it as a map service, i can get array instead of string or integer. e.g., i got fields: OBJECTID, ...
1
vote
1answer
17 views

Properly setting Extents in Arcpy Using path

I am trying to set the extents of my processing using Arcpy, but when my processing is completed, there has been no change to the extents (it results in an extent that did not go as large as I ...
4
votes
1answer
393 views

How to create Shapefile on ArcGIS Server side?

I am developing a script which gets an JSON array with point coordinates. This array is encoded to a python dictionary. From this I filter all points (latitude and longitude) and an ID. This ...
2
votes
1answer
19 views

Redirect remote shell command output to ArcMap geoprocessing tool display?

I have a Python script that runs a shell command on a remote server (using the Fabric module). When I run the tool in the debugger, I see all the output scrolling, as the command can take hours to ...
1
vote
0answers
16 views

Extract multiple grids from HDF with subset tool using ArcPy

This should be fairly simple thing but bugging me at the moment. I have ~5k HDF files in a folder with names: MOD11A1.A2001001.h24v05.005.2006343042921 and so on..... I have following which loop ...
0
votes
0answers
49 views

Using custom shape files as buffers in ArcGIS [closed]

I would like to use a custom shapefile as the buffer shape for a project that I am working on. I have created a buffer around a compressor station of 3 miles and am planning to clip the lines that ...