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

learn more… | top users | synonyms (1)

3
votes
2answers
75 views

Assign point IDs to respective start and end attributes of a polyline

I have two shapefiles, Point and Polyline. I'm trying to populate my polyline layer with the point data ID (systemID) where the lines start to where they end; eg. create two columns (from and to). The ...
0
votes
0answers
36 views

Using Modelbuilder or Python to write output a folder name using database or table file? [duplicate]

Has anyone worked on Modelbuilder or python to write to automate creating a folder using the database or table file to write output a folder name and or/create the subfolders? I recalled I had an aml ...
1
vote
1answer
55 views

Can't solve “list out of range”

I'm using arcpy in ArcGIS 10.0. My code is supposed to test the intersection between all layer in a geodatabase by group of 2, and if so, erase one feature of each couple by the other depending on a ...
0
votes
1answer
61 views

Add CAD feature class to Arcgis using arcpy

I'm trying to add a CAD layer (point, polyline, annotation...etc) into ArcMap by python code, i'm using Arcgis 10.1, IDLE(Python 2.7), I faced many codes but they all gives errors, so i'm blocked ...
1
vote
1answer
60 views

Problem with Nested For Loop in ArcPy

I have two vector layer files, 'hausnummer_cropped5' and 'gebaudepoints_cropped5 - Kopie2'. Both have a point geometry and I am trying to shift the locations of the gebaudepoints_cropped5 points onto ...
2
votes
1answer
92 views

Tutorial on creating python toolboxes?

I've done the ESRI training: Creating Python Toolboxes Using ArcGIS 10.1 but is there anything more in depth? Since VBA is no longer supported in ArcMap 10 and up I'm trying to convert a cross section ...
1
vote
1answer
67 views

Trying to loop if condition at PYTHON code using Arcpy

I'm working with Arcgis 10.1, i'm trying to loop if condition on PYTHON code, but they give me as error : Parsing error IndentationError: unexpected indent (line 18) I don't know what is going wrong. ...
1
vote
1answer
35 views

Using ArcGIS ModelBuilder and GeoCoding

I looked at ArcGIS and python and I'm not quite ready for that rabbit hole as I'm on a schedule. I have a little experience but not at the level to pick it up quickly enough for my time frame. The ...
1
vote
1answer
53 views

arcpy.da.UpdateCursor where clause persists

I have some unexpected behaviour in an UpdateCursor. I'm iterating over quite a large dataset, and I've found that Python freaks out less if I break up the iteration into chunks: env.workspace = ...
1
vote
0answers
24 views

Parsing long lat xml tags into shapefile using ArcPy? [closed]

i have this xml http://www.massdot.state.ma.us/feeds/MARoadwayEventsXML.aspx import arcpy import xml.etree.ElementTree as etree xmlD = etree.parse("C:\data.xml") root = xmlD.getroot() this will ...
2
votes
2answers
69 views

Adding * .prj file to output via Python script tool that creates fishnet?

I'm a new python user. I wanted to make a tool box like fishnet in ArcGIS 10.2. Everything, works fine. However, at output there is no .prj file, although spatial reference was defined at the tool. ...
3
votes
1answer
48 views

Thiessen Polygon Total Area Calculations Model Builder/Python Code

I am attempting to create a tool using Model Builder (and Python code) for calculating the average annual precipitation of a study area using the Thiessen Polygon Method. My model runs good other than ...
1
vote
0answers
55 views

Download layers from arcGIS online in python [closed]

How can I get layers/maps from arcgis online in Python? I mean to download layers from Arcgis online in python, just like publishing. I've searched about it in the documentation of Arcgis 10.2.2, but ...
3
votes
1answer
86 views

Using arcpy and script toolbox to add the date to a attribute table

I would like some information on how to add a date to an attribute table, by adding a user specified date in a script tool that will update the polygons attribute table. In short I have two polygons ...
0
votes
1answer
36 views

What is expression for finding perimeter in ArcPy and Field Calculator?

What is the correct format for finding perimeter as an expression for arcpy. I was able to use expression !shape.Area! to find the area of my polygon. However when I use the expression ...
3
votes
2answers
35 views

Exporting multiple dataframes as images using ArcPy?

I use this code to export a dataframe to png, and it works. import arcpy mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd)[0] ar = df.extent.height / df.extent.width ...
2
votes
1answer
47 views

Add value to field using arcpy

I calculated the azimuth angle between two points. I'm trying to create a new field where I will store my angle values, but although the field is created it stays empty, no values within! I'm using ...
2
votes
1answer
24 views

Trouble renaming layers using arcpy

Running ArcMap 10.1 So, I have a bunch of layers that all have the same name. I'm trying to rename them so that they have names that actually mean something. Everything runs fine until it is time ...
-1
votes
0answers
28 views

how to use “ListFeatureClasses” to shp add to dataframe by geometry

I'm using arcgis 10.2.2 and I want to make a tool I have a feature dataset that is being updated constantly with new feature class The purpose of the tool is to have the option to deploy all my data ...
0
votes
0answers
17 views

Change Privileges tool does not work against feature dataset containing a network dataset

I'm trying to change the privileges on a feature dataset that contains a topology and network dataset using the ChangePrivileges geoprocessing tool. This works if I run the command manually from the ...
1
vote
1answer
69 views

Use row as input to other processes in python

I am new to python and need help. Looked for my answer but don't know if I am even using the correct terminology. I have a model in which I iterated through rows and performed a set of processes on ...
1
vote
0answers
25 views

ArcPy RemoveLayer removes all layers in loop

I am trying to remove layers that are not found within a list. The loop iterates through the layers within the Map_Left data frame. However, when I run this, it removes all of the layers within the ...
1
vote
2answers
49 views

Multi Value User Input as Variable in SQL Statement

I'm attempting to write a script that takes a user's selection as a parameter and uses that as part of the SelectByAttributes function. The parameter represents field attributes and is multi value, ...
2
votes
3answers
65 views

Arcpy: Processing multiple files subsequently

I have an indexed dictionary containing files and want to "mosaic" (arcpy.MosaicToNewRaster_management) all files with the same index. The number of files per index range from 1 to about 30. ...
0
votes
0answers
25 views

How to get a polygon of the outline of a raster using arpcy

I have a large number of georeferenced raster datasets, for each dataset I need to create a polygon of the outline of the raster. I know this is possible using raster calculator in spatial analyst by ...
4
votes
2answers
52 views

How to check for corrupted raster data?

I am working with thousands of tiled (2km x 2km) 4-band NAIP images. When I diced the images in Erdas, the program corrupted many of the tiles. The screenshot shows an example of one of the ...
2
votes
1answer
40 views

Arcpy SelectByAttributes and Show Selection

I understand that in order to do a SelectByAttribute in Python, you need to first convert the shapefile to a feature layer using the MakeFeatureLayer_management function, and run the SelectByAttribute ...
3
votes
2answers
46 views

How to get size of SDE geodatabase feature class

Is there a way in catalog or arcpy to determine the amount of hard drive space a SDE feature class takes up on disk? In catalog the 'size' column is blank and Esri help states: The size, ...
1
vote
1answer
30 views

How to use a feature class attribute to look up values in a table and pass them as parameters to a function?

My problem: I have a set of points inside a polygon. My goal is to figure out how long it takes (in days) for each point to move outside the polygon, based on a daily movement which affects all the ...
1
vote
0answers
34 views

Extract layer by attribute and export to new shapefile using arcgis scripting 9.3

I have a n-number of shape files based on attribute i want to extract the layer to export to new shape file, Using feature class to feature class conversion i can do, but i want to check for specific ...
1
vote
0answers
50 views

multiprocessing and the ArcGIS in_memory workspace

I am trying a script that makes use of multiprocessing and a number of tools within arcpy. The script works only if I write all input, intermediate, and output from child multiprocessing executions to ...
1
vote
1answer
35 views

python script to retrieve names and scale range from an ArcGIS MapServer url

i am pretty new at ArcPy. i need to write a python script to retrieve names and scale range from an ArcGIS Map Service url. i had a look around json and url2lib but i am lost. I want to retrieve the ...
3
votes
0answers
52 views

Changing workspace path of query layer using ArcPy?

I'm trying to change the workspace path of a query layer using the code below and it always breaks. The layer is connected to a view in an Oracle Spatial 10g database. The database is SDE enabled ...
0
votes
1answer
37 views

Sort legend items up and down with arcpy

I work with arcmap 10.2.2 and I have 10 mxd's in one folder. I try to sort the legend items with a python code by moving the legend items up\down and i want that the layers in the TOC stay as is. I ...
1
vote
1answer
52 views

Saving a ArcMap layers RGB values into the attribute table

I am wanting to take a symbolized layer in an mxd, and save it's symbol color (like a polygon fill) into its attribute table as an RGB value. My goal is to use this value in MapInfo to symbolize it's ...
3
votes
0answers
25 views

Can I automate the transfer of symbology information of a raster to a polygon feature?

I have a raster dataset that is symbolized using Natural Breaks (Jenks) classification (9 classes). To reduce file size for web service display and download, I used the Reclassify tool to remap pixel ...
0
votes
0answers
30 views

Moving legend items up and down with arcpy [duplicate]

How can I move a layer up/down in the legend using arcpy? I work with ArcMap 10.2.2
1
vote
1answer
39 views

Find points within a radius in ArcGis 10.2

I have a feature service which is created from a view in a geospatial geodatabase. I want to retrieve all the point/geometries than fall within a specific distance. I am using arcgis 10.2 I know that ...
0
votes
1answer
87 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, ...
1
vote
0answers
36 views

Extract .mxd file + data from map package .mpk?

I have two applications - a pc app which uses .mpk and a mobile app which uses .tpk I can generate both, given the .mxd file - but I'd like an easy way to go from a .mpk to .tpk The idea being that ...
2
votes
1answer
25 views

Changing the active tool in an ArcGIS Python Add-in Tool Palette?

I have an ArcGIS Python Add-in project with a tool palette that contains a dozen different tools. I would like to be able to change the 'active tool', i.e. the tool that is visible on the toolbar, ...
1
vote
0answers
23 views

Boundary sharing line featureclassess [closed]

In my data I have to remove some line feature classes, which are those sharing boundaries with two states i.e. New York and Philadelphia. I have to remove all data of Philadelphia but some feature ...
0
votes
1answer
38 views

Optimizing script with in_memory selection

I had a problem solved here. I had 2 features: polygons and points, both containing similar attributes(example: street name, number). Each polygon must have equivalent point added(same street name, ...
1
vote
3answers
37 views

Multiple python script for Alter Field

I'm a novice programmer and I would like to ask for something which will facilitate my work. I need to rename all the field names in some shapefiles I am working on and since renaming is an arduous ...
0
votes
1answer
21 views

Using valueAsText, giving me unicode data instead of a list

I am learning Python to create toolbox right now. When I'm trying to get the parameter, using valueAsText, the date returned is unicode instead of a list that I was expecting. This is the code that I ...
1
vote
1answer
63 views

How to get the layer name with a arcpy code

Using the FeatureToPoint tool I've having difficulty calling just the name for file without the extension or path. Here is the part of the script that I'm creating that Im stuck on. eg. ...
0
votes
1answer
40 views

How to make connection

How to connect a argis, sde version through stand alone python script. SDE.Mapping is child version of SDE.Default and I want to make child version of SDE.Mapping . I am using direct sde services
1
vote
2answers
126 views

What causes ERROR 000210: Cannot create output in_memory\AND from ArcPy?

The ArcGIS for Desktop "ERROR 000210: Cannot create output" has been reported on this site a number of times but an in_memory workspace seems to have been implicated only once: ERROR 000210: ...
0
votes
1answer
23 views

Creating a spatial reference in arcpy from projection name

I am using ArcGIS 10.2.2, Python 2.7. I want to create a spatial reference from the name of a projection, e.g. NAD_1983_BC_Environment_Albers, using the arcpy tool ...
2
votes
1answer
43 views

XML ElementTree in ArcPy consuming WMTS XML

How do I work with the xml Element Tree to obtain the ScaleDenominator parent where ows:Identifier = default028mm? With a fair bit of swearing I have managed to hack my way into all of the WMTS ...