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

learn more… | top users | synonyms (1)

0
votes
0answers
19 views

Writing Python script to populate fields of layer with underlying info from another layer?

I have layers of points and lines that have to be updated regularly. It needs to have the intersecting attributes from another layer stored in its fields/attribute table. IE. towns, school districts ...
0
votes
1answer
32 views

Create a Loop for Arcpy

I am looking for help to write a loop a arcpy.CalculateField_maagement process where the User is asked with the 'raw_input', prior to the tool running "Do you need to change a field value(yes/no):", ...
-1
votes
0answers
17 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, ...
1
vote
0answers
19 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
31 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
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
76 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 ...
1
vote
1answer
35 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
1answer
32 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 ...
2
votes
1answer
21 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
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 ...
0
votes
1answer
32 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
0answers
24 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 ...
2
votes
1answer
21 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 ...
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 ...
1
vote
0answers
39 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 ...
2
votes
1answer
51 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 ...
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 ...
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 ...
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 ...
5
votes
1answer
85 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 ...
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 ...
0
votes
0answers
46 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 ...
0
votes
0answers
33 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 ...
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
17 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 ...
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 ...
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 ...
3
votes
1answer
109 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
1answer
26 views

Python: how to set a different output folder

I want to transform some vectors to rasters in my folder but I have difficulties setting the output folder. The following code only allows me to output to the original database. I hope to output all ...
0
votes
0answers
38 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 ...
1
vote
0answers
39 views

Updating Field Mappings Parameter on table selection in Python Toolbox?

I am building a python toolbox with ArcPy and would like to associate an input feature class parameter with a field mapping, so that once user selects the input feature class the field map populates ...
0
votes
0answers
13 views

Pythonw has stopped working when running arcpy.SubsetFeatures_ga

I'm currently trying to subset a shapefile into training and validation files. When I run the following line of code, python crashes. I'm using ArcGIS 10.1. arcpy.SubsetFeatures_ga(current_shapefile, ...
2
votes
1answer
19 views

problem deleting shapefiles because still in use by arcpy cursor [duplicate]

I have a function outputTblContents which contains def outputTblContents ( path ): rows = arcpy.SearchCursor(path, fields="alpha; beta") for row in rows: print("{0} => ...
1
vote
1answer
42 views

Export data with data frame coordinate system using ArcPy

I want to export data in current data frame and use the same coordiante system as data frame using ArcPy as I have multiple files. Any suggestion on how to "Export with data frame's coordinate ...
1
vote
0answers
24 views

Sorting cursor made of Network Analyst outputs?

I have solved OD Cost Matrix analysis and I'm trying to access the results using da.SearchCursor with SQL sorting. The problem is that the result is not sorted at all. lines = ...
2
votes
2answers
35 views

ArcGIS zoom to next selected feature

How could I adapt the following code to enable me to zoom to each individual selected Geometry one after the other? import arcpy mxd = arcpy.mapping.MapDocument('CURRENT') df = ...
0
votes
1answer
39 views

Confusing results from script that uses arcpy.clip analysis?

Following on from previous question Python code that uses arcpy.describe skips if statement?, I have now attempted to include clip analysis and this is my result; I am confused as to what is ...
1
vote
2answers
30 views

add multiple rasters, each located a branch too deep in separate folders - ArcGIS

I have a year of daily raster datasets (365) that I would like to use the Cell Statistics tool on; however, each raster is located in a separate folder so I cannot add all of them at once. ie: ...
0
votes
2answers
24 views

Selecting features in feature class and updating feature class fields based on Spatial Selection?

Using arcpy, is there any way to update the selected records of a feature class' field based on a Selection by Location of another shape file? In other words, update a field in a feature class' point ...
2
votes
1answer
48 views

How to delete selected rows using ArcPy?

I want to delete all rows in a feature class but remain rows 1 to 5. In other hand I want to remain first five rows and delete others. I know that I have to use search cursor and update cursor but I ...
1
vote
1answer
38 views

Adding Vertical Reference in Python to ArcGIS feature dataset

I am creating a python script to generate a terrain. In the process I am creating two feature datasets. However, in order to successfully create this FD, i need both horizontal and vertical datums. I ...
0
votes
1answer
33 views

How to use list broken Data sources for layers saved in Windows not within an MXD

I have seen a few question related to listing broken data sources of layers within an MXD MXD list broken links See Link . I am interested in layers that are not within an MXD. That are sitting ...
0
votes
1answer
39 views

Can't get the where clause in Select layer by attribute working!

I am trying to develop a script that searches for a particular ID in a user selected field. To this end I have used the select layer by attributes tool to search for a derived number in a field ...
0
votes
0answers
22 views

Is it possible to save a dxf in memory

Following on from my question here, when I run the ExportToCAD tool arcpy.ExportCAD_conversion(listOfLayers, formatRelease, location + fileFormat, "Ignore_Filenames_in_Tables", ...
3
votes
3answers
66 views

How do I compare two features to test if they are identical?

What is the most efficient method for determining if two features (points, lines, or polygons) are geometrically identical? I'm not concerned about a square figure that contains eight vertices (four ...
0
votes
0answers
31 views

Consolidating spatial data for nearly 200,000 acre area

more of a broad question here: I'm trying to take a huge amount of spatial data for a specific 200,000 acre area, collected over 15 years dating back to 2000, and organize it. The data layers relate ...
1
vote
1answer
39 views

Getting aspect and reclassifying raster files using Python in a loop

By using Python in PythonWin 2.7.3, I tried to obtain aspect files of a list of raster files in a folder(called database_Dem20) and save it to another folder, database_Dem20/testOutput. In the same ...