Tagged Questions

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

learn more… | top users | synonyms (1)

2
votes
0answers
56 views

Developing workaround to arcpy.asShape truncating all values to 3 decimal points?

I've read a few questions\answers about converting a GeoJSON Shape into an ESRI Object. Unfortunately most of the answers pointed to decoding the dictionary's manually. Im a bit more lazy ^_^ The ...
0
votes
1answer
35 views

integrating arcpy with other packages [duplicate]

I have the windows installation of python 2.7 that came with arcgis 10.2. In my linux installation of python, I've become fond of other packages, and I'd like to incorporate them into the windows ...
1
vote
1answer
42 views

ArcMap Export PDF vs arcpy Export PDF scale differences

I'm experiencing differences from exporting features to PDF from within ArcMap and using a stand alone python program. Basically, I'm selecting a feature from a layer, zooming to the selected extent, ...
4
votes
3answers
80 views

Maximum number of shapefiles for merge tool?

I have over 180,000 shapefiles that I have to merge (or append) into a final shapefile. I have written a python script to do so which uses the acrpy.append_management tool. However the runtime is too ...
0
votes
1answer
52 views

Arcpy MakeFeatureLayer won't loop

The arcpy snippet below is intended to generate a list of technicians scheduled to work, and then generates a unique feature layer for each one's stops. fcStops = "TaskRoute1016" with ...
3
votes
1answer
42 views

PageLayoutObject error when exporting to a TIFF using arcpy and Python

I am having an issue when attempting to export to a TIFF in arcmap, using arcpy in Python. The full process I have scripted is as follows: Add rasters to a raster catalog panning to the raster data ...
1
vote
1answer
65 views

Running ArcGIS model at specified time or with delay?

I am looking to start running an ArcGIS model built in ModelBuilder in the future. Start at a specific time. or Start in x hours. or something similar. When I leave the office I may have data ...
2
votes
2answers
84 views

Arcpy Slope Analysis Script

I'm trying to run slope analysis in ArcGIS. I have written an ArcPy script that converted feature layers to raster files. Now I have a list of rasters (each with a unique name) in the table of ...
3
votes
1answer
56 views

Track progress of running GP tools (in arcpy script) programmatically?

I am looking for a way to access a GP tool running in a Python script to be able to see how much of the job has already been done. I have found SetProgressor function, but this one is available only ...
1
vote
1answer
24 views

Batch enabling MapTips

In the layer properties of each layer there is an option "Show MapTips using the display expression" that is by default disabled and I would like to find out if there is a way to enable this option by ...
1
vote
1answer
36 views

arcpy geometry difference method fails randomly, not reproducible

Has anyone used the arcpy geometry difference operator and seen unexplained errors like what I describe below? This is a weird one. I have a script that calculates wave fetch distance in the ocean ...
2
votes
1answer
72 views

Changes not persisting in ArcGIS server from ArcPy script

I have a ArcPy script (10.2) which connects to an ArcGIS server (10.0) versioned geodatabase, via an .sde connection file in the Database connections directory through direct connect on a Microsoft ...
1
vote
1answer
40 views

Run model from python .. module object not callable

Having issues to run a model from python, below the actual code , always return module object not callable. ArcMap 10.1 using arcPy esri python 64 bits Any ideas why ? Thanks import arcpy ...
1
vote
1answer
32 views

How to reclass aspect raster to float values

So I have an aspect raster that was created from a DEM. I'm trying to reclassify it using python, but I'm running into some issues. Here's the setup: I need to reclassify values in the aspect raster ...
0
votes
2answers
69 views

Remove item from legend on a several mxd's

I used this code from this question here: Remove item from legend using ArcPy? However I keep getting an error at the following line: legend = ...
0
votes
2answers
37 views

Converting Feature coordinates to text (same as output from UNGENERATE command in ArcInfo Workstation)?

I am trying to convert stream segments to text. This is function for the script #function to convert feature to text as ungenerate command in ArcGIS workstation def ...
2
votes
1answer
60 views

Updating fields of feature layer and reflecting changes in original data

I am trying to write a script that will select points from a feature class that are within a polygon and update the fields within the original point feature class. The problem I'm running into is ...
4
votes
1answer
70 views

How to delete geoprocessing results in ArcGIS without closing mxd file?

I am trying to run a loop of a couple thousand maps in ArcGIS 10.1 but the program keeps crashing after printing about 100 maps at a time. I read here that I need to make sure my results in Results ...
1
vote
1answer
44 views

Does arcpy have a tool for converting file geodatabase Table to JSON?

arcpy has: arcpy.FeaturesToJSON_conversion() which can handle feature layers, but what about file geodatabase tables? Not too hard to implement custom, but I want something with the same API as ...
3
votes
0answers
68 views

How to use Python's subprocess module in a for loop ArcGIS?

I am new to scripting with ArcGIS. Although this might be an easy thing for those that know Python well, I haven't figured out how to use the subprocess module in a script. I actually think I'm ...
3
votes
2answers
81 views

How do updateParameters and updateMessages Interact in a Python Toolbox?

I have been developing a Python toolbox which consists of 6 parameters. I have received immense amounts of help on this through StackExchange through the following posts: How to Determine if a Layer ...
2
votes
0answers
42 views

Validating whether PDF file Uploaded as part of Geoprocessing Service of ArcGIS for Server?

I'm developing a Python Script that will be a Geoprocessing Service in ArcGIS Server. The Script has a Button for Users to OPTIONALLY Upload a PDF. If the PDF is Uploaded it gets inserted into the ...
2
votes
1answer
29 views

Is there a a way to add a topology dataset to an mxd with arcpy?

I have a script that identifies certain layers from a folder containing several geodatabases. Part of the scripts purposes, or intended purpose is to have it add a topology dataset to the dataframe. ...
2
votes
2answers
68 views

Delete Files in a folder and disregard an existing folder

I did a lot of geoprocessing steps and now I like to delete all files including result, result, _join, _interand reclass in their name. I can do this with the following import glob import os for fl ...
2
votes
2answers
57 views

Using Python to move Text Elements for creating multi-page PDF

I have a map document which contains several text elements that I have grouped and am able to programmatically update. These groups represent a page of data. Now I'd like to export this data as a ...
1
vote
1answer
46 views

Performing multiple “Closest Facilities” analyses for multiple feature classes

I am trying to calculate network distance from 10 points within 896 polygons "SA1s" (a total of 8960 facilities), each to ten points within 186 polygons "DZNs" (a total of 1860 incidents). I would ...
7
votes
2answers
143 views

How to Determine if Layer is a Point

I have been working on a Python toolbox which contains 6 parameters. I am a little lost on all of the different data types available in ArcMap (it seems like there's hundreds of them!). However, one ...
1
vote
2answers
37 views

Creating multiple address points for each unit using arcpy

I have a point feature class of addresses and an excel spreadsheet of all the suites associated with each address. I need to create a point for each suite belonging to an address. Is there a way, ...
1
vote
0answers
40 views

Clip Management won't work outside of ArcMap/Catalog

Okay so I have a short script that works great when copied into the python window in ArcMap or ArcCatalog, but refuses to work in an IDE for whatever reason. The error that is thrown is: Start Time: ...
2
votes
2answers
44 views

How to Change Parameter Type from Optional to Required

I am creating a Python toolbox with 5 parameters. One of the parameters is a Boolean/checkbox, which checks if the user wants to edit the labels of a shapefile. What I would hope to do is if the user ...
1
vote
2answers
38 views

Optional Parameter Not Being Optional in a Toolbox

I have been creating a toolbox that contains 4 parameters. Two of my parameters involve editing the labels of a shapefile. I want to have these two parameters as optional: if the user does not want to ...
0
votes
1answer
29 views

How do I define 'KrigingModelOrdinary'

How and where do I define the KrigingModelOrdinary Here is the code: rasterKrig = "run{}_Krig_{}".format(counter, field) outKrig = arcpy.sa.Kriging(Stations2010o3Data__2_, field, ...
7
votes
2answers
178 views

Calculate Date Field - today's date from datetime.date.today

I'm working on part of tool that will use arcpy.CalculateField_management to add the current date to the attribut table. I've wandered far and wide on the interwebs and can't seem to find the ...
1
vote
4answers
165 views

Arcpy: what tools are most suited for this job?

I'll try to be as much detailed as possible but please let me know if anything is missing: I'm trying to get the number of lines in layerA that intersect with each line in LayerB and stores that ...
2
votes
0answers
79 views

Error 000212 Cannot create XY event source from arcpy.MakeXYEventLayer_management?

So I am using arcpy to create an output feature layer. I am using the command: arcpy.MakeXYEventLayer_management(wells, "longitude", "latitude", wells_layer, GEOGCS, ""), where wells is my ...
1
vote
1answer
54 views

Extract polygon attributes from covering polygon with highest area

I have a fishnet grid (polygon layer) and another polygon layer containing some hexagons. I would like for each square polygon in the fishnet layer that covers a hexagon (even a tiny edge of it) to ...
4
votes
1answer
73 views

Installing scipy.spatial with ArcPy gives DLL load failed error on import?

I am running python 2.7.6 from an ArcGIS installation. I have tried to install scipy from the Python Exchange Packages here, using the scipy-0.14.0.win32-py2.7.exe executable. I get no error importing ...
6
votes
1answer
48 views

Ordering tool display within a Python Toolbox

I have created a python toolbox containing a number of classes which define the various tools within. As these classes are part of a workflow in which the tools are to be executed sequentially using ...
1
vote
0answers
46 views

Esri Python Toolbox(pyt) corruption in ArcToolbox.dat

Symptoms: Open ArcCatalog and all tools within Python Toolbox(pyt) have a red-x error next to them claiming that "Arcpy module has no attribute Parameter" Close ArcCatalog Delete ArcToolbox.dat file ...
0
votes
0answers
46 views

Does anyone know why this Kriging isn't working

Process: Kriging tempEnvironment0 = arcpy.env.extent arcpy.env.extent = "56662.1788730418 308952.917606764 1698384.17317964 1912328.52737378" rasterKrig = "run{}_Krig_{}".format(counter, field) ...
1
vote
1answer
42 views

Using dynamic text elements from ArcMap in conjunction with text elements derived from Python

I have a script that cycles through features based on attributes and makes a PDF centered around each feature. I would like to be able to include both a dynamic text element for the date as well as a ...
2
votes
2answers
93 views

ArcGIS - Getting Python toolbox to function properly

as the header says, I do have a problem in getting my toolbox to function the way I want it to. In the following my parameter definition is shown, where from I would expect to get only feature classes ...
0
votes
0answers
36 views

Using ListTransformations function in ArcObjects, C# and ArcGIS Engine?

I need to call arcpy.ListTransformations function in C#. I have to pass 2 spatial References (ISpatialReference objects, I guess) and an envelope(IEnvelope object) to this function. This function ...
1
vote
0answers
63 views

Using gdal ReadAsArray or Arcpy.RasterToNumPyArray on python 2.6 32bit without it crashing

I am trying to run ReadAsArray on an entire raster and on a single band, python will crash without an error message when trying to do either. Is there a way I can create a 3d array without having to ...
0
votes
1answer
38 views

Arranging elements horizontally in ArcGIS tool

Is it possible to arrange multiple check boxes horizontally in a tool and changing the parameters dynamically (adding/removing) based on user selection of check boxes?
2
votes
1answer
41 views

Cut polygon shapefile with 2 parallel lines to derive new inside polygon?

Using Python scripting: How can I clip a polygon shapefile with parallel lines (polyline shapefile) to derive new inside polygon?
0
votes
0answers
17 views

How to disable featureset completly even draw option

I need help in developing a python tool. I have few queries in FeatureSet datatype. When i am using featureset in 10.2, it is giving options to draw on the map or to select some features from ...
1
vote
1answer
39 views

Set default projection of geometry objects in arcpy

I have a script that creates a polyline geometry from scratch using some math to generate coordinate pairs. At the same time, there is a user-defined polygon shapefile that is used to "erase" the ...
3
votes
1answer
58 views

Trying to generate a PDF for each feature in a feature class based on an attribute with Python.

I have a feature class of points that represent storm water inlets. I am trying to automate a process that does the following. finds all of the inlets that have a field called "Marker" populated ...
1
vote
0answers
30 views

Error writing defaultdict values to feature class rows

I originally posted building dictionary from feature class field values, how can I ensure there are no duplicate values per key. The goal is to update another field with all the values per key, which ...