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

learn more… | top users | synonyms (1)

1
vote
0answers
85 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
77 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
298 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
79 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 ...
2
votes
1answer
232 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 ...
4
votes
1answer
82 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
34 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
113 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 ...
-1
votes
1answer
212 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
279 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
60 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
27 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
2answers
116 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
103 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
64 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
108 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
45 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
1k 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
91 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
108 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 ...
1
vote
2answers
140 views

How to get a search cursor on a particular version in arcpy

I have a versioned database in ArcGIS and I am wondering how can I tell arcpy what version to query. The closest I have got to an answer has been building a particular connection file that specifies ...
0
votes
0answers
452 views

ArcGIS 10.1 - Error No spatial reference exists

I'm encountering a new error on some geoprocessing. It originally showed up while running commands in arcpy but now it crops up whenever I run some tools. I've been using the Extract by Mask on some ...
2
votes
2answers
82 views

What are QGIS Arcpy Equivalent Functions for MakeFeatureLayer and SelectLayerByLocation?

I have a script that I had created using ModelBuilder, but our field personnel use QGIS 2.0. Below is a snippet of the code. I am wanting to know if there is an equivalent using pyqgis so that I can ...
0
votes
0answers
189 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 ...
3
votes
0answers
34 views

Is it possible to add an ArcGIS attachment to a row in Oracle/SDE using oracle stored procedures?

So far I have been able to attach files to features within a featureclass using the python tools and ArcObjects. Within Oracle I have been able to add features with geometries using the ST_Geometry ...
1
vote
1answer
97 views

Using tool validation to create parameter based on 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 ...
0
votes
0answers
47 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 ...
1
vote
1answer
59 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
1answer
93 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 ...
2
votes
1answer
29 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
162 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 ...
0
votes
1answer
27 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 ...
1
vote
1answer
60 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
117 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)) ...
2
votes
4answers
245 views

Summarising all fields in attribute table using ArcPy? [closed]

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 ...
0
votes
0answers
52 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
55 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 ...
0
votes
0answers
94 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
1answer
126 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. ...
3
votes
2answers
409 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 ...
0
votes
0answers
31 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
1answer
144 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 ...
0
votes
1answer
104 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 ...
1
vote
1answer
88 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
122 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 ...
0
votes
1answer
196 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 ...
2
votes
1answer
79 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 ...
0
votes
1answer
30 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
24 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 ...
1
vote
1answer
53 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 ...