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

learn more… | top users | synonyms (1)

0
votes
0answers
7 views

Alternative way to find intersection between two polygon feature classes

I have been working on making a script to find intersection between two polygon ArcGIS feature classes. I can successfully do this in arcpy instances using spatial join or using search cursors on the ...
2
votes
2answers
100 views

Accessing geometry with SearchCursor in ArcPy

I'm trying to write a script that clips all feature classes in fcList by the successive rows of a clip feature. I'm using arcpy with ArcGIS 10.0 The problem is that I need to verify whether the ...
1
vote
0answers
43 views

Legal description polygon mapping/creation with Arcpy

What I have: an excel file with the names of properties within an area that is part of the PLSS in which Township/Range, Section and Lot numbers are used. The file contains a legal description for ...
1
vote
0answers
6 views

How do I use validation to create a parameter based on the fields of another parameters input

I'm assuming I'm missing something and this is a pretty easy thing to do but I'm stumped... I'm working on a script that currently takes and input excel file and uses a "hard coded" field name that I ...
1
vote
0answers
16 views

python shell crashes on table to table conversion

I have two computers running the same code and on one (with better performace) it runs fine but the other crashes the python shell when executing the code below. I really don't understand why, any ...
0
votes
1answer
21 views

Loop stops before expected without error message

I try to run a script that clips all the feature class of a geodatabase by the successive features of a clip layer (named pochoir). Thank to support here and here, the test of the intersection is ...
0
votes
2answers
759 views

ArcGis Python Script, Calculate Field

Sorry for my English. I am trying to write a Python Script for ArcGis 10.2. #import system modules import arcpy import math from arcpy import env #Set environment options ...
0
votes
0answers
8 views

Slanted raster along the line? Wind erosion model and windbreak effectivity

I'm working on wind erosion modelling and windbreak potential. Imagine windbreak, which has some values of optical porosity (in %) and this values determinates the effectivity of windbreak in specific ...
0
votes
0answers
8 views

Is there a faster alternative to arcpy spatial join?

I am wondering if there is a more efficient method than using arcpy spatial join in python. I am currently using intersect and closest methods (including a near distance field) so would need ...
0
votes
1answer
65 views

Exporting Folder of shapefiles to file geodatabase (GDB)?

Shapefiles Above mentioned is the link for the sample folder of shapefiles. I am working on exactly opposite of Export File Geodatabase to Folder of shapefiles I have a multiple folder of shapefiles ...
0
votes
1answer
89 views

Weighted Overlay - passing parameter as text error?

For some reason when hardcoding the save path for the wieghted raster just before runtime it works perfectly. Like such... arcpy.env.cellSize = "90" arcpy.env.workspace = r'G:\Xcel\Route ...
2
votes
1answer
16 views

Does GDAL has any substitute function for the ExtractByMask in arcpy

I am now using arcpy: arcpy.sa.ExtractByMask(weight_raster,elev) both weight_raster and elev are raster data in different size. I want to use functions in GDAL to replace this arcpy methods. Does ...
1
vote
1answer
20 views

Checking whether Spatial Reference is Projected Coordinate System using ArcPy?

I'm modifying CreateFishnet in ArcGIS 10.1 using python.. I want to ask the user to input a projected coordinate as spatial reference. How can I check if the user didn't put geographic coordinate by ...
11
votes
2answers
647 views

Why learn/use Python Toolboxes over Python Script Tools?

I've written a few Python Toolboxes (which are new at ArcGIS 10.1), but am yet to decide whether/when I should write them rather than Python Script Tools in a standard toolbox. I thought the Online ...
0
votes
1answer
26 views

multiple shapefile export to kml

I 'm new in Python script and i want to export shapefiles in the folder as the kml file with define layer files. for single shapefile it work perfectly refer below script. But I want to export 4 ...
0
votes
1answer
28 views

copy only selected with CopyFeature_management

I am trying to test if each feature of a feature class list intersect each feature of a shapefile (clip layer). I'm working with arcpy in ArcGIS 10.0 The arcgis desktop help says that if the feature ...
2
votes
1answer
52 views

How to query values from a list in Python?

I have a list like this... list = ['1','2','3','4'] how can I use arcpy.Select_analysis to select features that have the attributes in the list. qry = '"SECDIVNO" IN ' + str(tuple(list)) ...
0
votes
1answer
14 views

Loading data from shapefiles into specific feature classes

I am trying to bulk load a collection of shapefiles into empty feature classes in ArcMap 10.2. The issue here is that the names of the shapefiles and the feature classes need to match up. Is there ...
2
votes
0answers
77 views

Using arcpy.da.editor on a transactional version raising errors

I've run up against a wall trying to get an edit session to work on a version. These are the scenarios Ive gone through in the code and their error mesages: Setting up an edit session not as a ...
2
votes
1answer
111 views

Error with da.UpdateCursor and SDE feature classes

I am making my first attempt at editing an ArcSDE feature class with python through a da.UpdateCursor. I'm essentially taking code I've written for a file geodatabase feature class and applying it to ...
6
votes
2answers
461 views

How to write scripts that can call on both Arcpy and PyQGIS?

I have spent quite a bit of time looking for a clear answer this topic and have still been unable to really accomplish my goal of accessing PyQGIS in a stand alone script. Parts of answers have been ...
0
votes
0answers
22 views

Array to Feature Class and XYZ to Table Issues

I am trying export vertices of a line to a point feature class using the code below. I am using ArcGIS 10.2.2 and do not have access to Spatial, 3D, or Network analyst. I used ET GeoWizards to export ...
2
votes
4answers
66 views

Summarising all fields in attribute table using ArcPy? [on hold]

I was hoping to run a script that will iterate through all fields in an attribute table, SUM each field and produce the result in a table. The script below will essentially do what I want with one ...
1
vote
4answers
71 views

Apply Symbology to Rasters using Arcpy Script

I have an ArcPy script to apply the symbology of one raster layer to all of the raster layers in the table of contents. I have used this script before with feature layers instead of raster layers, and ...
6
votes
1answer
3k views

Lidar - Automated building extraction (Improve Process)

I have the following process for automatically creating building outlines/footprints from Las files and was wondering if anyone can help improve it or has suggestions for other processes to use? ...
1
vote
1answer
113 views

Importing file geodatabase (GDB) to table of contents (TOC) of ArcMap?

I have a geodatabase with several feature dataset and feature classes associated with it respectively. I would like to create a .mxd where the Table of contents consist of group layer and each group ...
0
votes
0answers
27 views

Duplicate FID for points

I ran the script below to export feature vertices to points. The code works but after 10,000 points the same FID appears for 5 to 10 points. This continues for the rest of the dataset. There are ...
0
votes
0answers
46 views

How do I compare and replace data using python?

Here is my problem, I have several datasets that get updated fairly frequently. They are currently loaded in an enterprise GDB but the updates come in file system folders as shapefiles. What I ...
2
votes
1answer
34 views

ArcPy: check in and out of Advanced/Standard concurrent license

Is it possible to check in and out of a concurrent license straight from ArcPy. For example, sometimes I need to use a buffer right or find duplicates. Both tools require ArcPy advanced or Standard. ...
4
votes
1answer
152 views

How can I exclude a field on a table from being copied?

I have a query "layer": >>> r = arcpy.MakeQueryLayer_management(r'C:\path\to\connection\file\connection.sde', 'TEST', 'SELECT T.ID AS OBJECTID, T.* FROM MY_TABLE T WHERE T.SOME_COLUMN = 1', ...
1
vote
0answers
17 views

Error changing version using ArcPy, produced from escape character in version name

I've got a script which creates a version from BASE, appends a feature to a dataset and then reconciles/posts. It runs successfully when I use a different SDE connection that doesn't have a backslash, ...
1
vote
0answers
24 views

Arcpy addin editable textbox on tool bar

I would like to add an editable toolbox on an arcpy addin toolbar. This would be used to change values of a threshold but I don't think this is currently available. (What I would really like is a ...
1
vote
1answer
51 views

Where to break the loop to make several polyline instead of one?

I am trying to solve a problem, I am pasting part of the code: from arcpy import env arcpy.env.overwriteOutput = True spatialRef = arcpy.SpatialReference("WGS 1984") polylineFC = ...
2
votes
1answer
93 views

Optimizing arcpy script to batch generate OD cost matrix in road networks

Following the question I asked in this thread, I wrote a python script designed to compute an OD cost matrix given a road network and origins/destinations locations. I am completely new to python, so ...
0
votes
1answer
497 views

ArcPy SelectLayerByAttribute Error and how to control GP output layer name

I have a rather long script that first references an SDE feature class (non-versioned) to perform an attribute selection based on a SQL selection. I've been unable to figure out why the script will ...
3
votes
1answer
337 views

mosaic raster to file geodatabase yields missing raster sections

Since upgrading to ArcGIS 10.1 (SP 1) from 10.0, I've been encountering an issue when running the arcpy.MosaicToNewRaster_management() tool with output to a file geodatabase. I'm principally working ...
0
votes
1answer
97 views

How to automatically generate least-cost paths between several polygons?

What is the fastest way to automatically generate least-cost paths (LCPs) between several polygons with ArcGIS ? I created a python program to do this by using the functions "CostDistance" and ...
-1
votes
0answers
41 views

Error creating polygons with ArcPy [on hold]

Based on the example from this page, running the code below results in an error message. Can someone take a look and tell me what I am doing wrong? import arcpy # A list of features and coordinate ...
5
votes
2answers
167 views

Arcpy: Names and distances of nearest intersecting roads in layer 1 to end points of a road segment from layer 2

As shown in the image below, I'd like to return a new field in layer 2 that for each segment stores a string:"Road C, 1 km from Road A to 0.5km From Road B". Calculation of the distances could be ...
1
vote
1answer
63 views

region growing feature selection using arcpy

I have a polygon featureclass consisting of parcels touching boundary with each other and for which areas are computed in the attribute table (Figure a). I want to select polygons in an iterative way ...
0
votes
1answer
49 views

Python Script to Identify and Flip Lines Digitized in the Wrong Direction

I have a river dataset that was digitized both in the direction of flow and opposite the direction of flow. I need to find an automated method to determine which lines were digitized from downstream ...
0
votes
2answers
55 views

Select value from list in Python toolbox

within a Python toolbox in ArcGIS 10.2 I fill a parameter with a list. parameters[0].filter.list = myList It is essentialy a list of strings and will give the user a range of predefined years. Later I ...
1
vote
1answer
20 views

Arcpy reclassify all values to same number

Using ArcGIS 10.1 and arcpy, is there a way to reclassify all values of a raster file to the same value (leaving NoData Values as "NoData")? Lets assume that I have no way of knowing what the actual ...
2
votes
1answer
157 views

Using Python to connect to Multiple SDE Database Connections

I am writing a script that accesses multiple sde Database connections. I have set the script to include accessing the environment workspace: import arcpy arcpy.GetParameterAsText(0) ...
0
votes
0answers
16 views

Calling An ArcGIS Webmap's Scales

I am composing an Arcpy tool to help users cache their current mxd's webmaps (our own services). I want to know a way to call the ArcGIS Web Map's scales with ArcPy. Once I have the web maps scales, I ...
1
vote
1answer
17 views

Using ModelBuilder to replicate series of tasks without deleting output features first?

I am calling a number of files that I want to clip etc in ModelBuilder which clips data and sends it to a specific feature class. I want to re-run that same process for which I have converted the ...
7
votes
1answer
236 views

Efficient Network Neighbors?

I would like to identify the Kth order neighbors of an edge on a network, specifically the neighbors of a large set of streets. For example, I have a street that I'm interested in looking at, call ...
1
vote
1answer
28 views

How to loop a Select by Attribute to use in a Select by Location?

I am new to python scripting and I need help. I am trying to select one row at a time on a shapefile that contains buffer rings around sites we are working on (some rings overlap), and for each site ...
0
votes
3answers
182 views

Filtered list in ArcGIS toolbox

My goal is to grab a bunch of feature classes, select the first feature class, list the fields, and return that list to parameter 1 as a filtered list. My ArcGIS toolbox is setup with 2 parameters. ...
1
vote
0answers
31 views

How to edit a service definition file (SD) so as to change the Data source (User in oracle)

I am using Oracle 11g ArcGIS 10.2 Considering I have an enterprise geodatabase and I am connected as user1/mypass@myIP/xe I create a map from my table "mylocations" I choose share as ...