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

learn more… | top users | synonyms (1)

1
vote
2answers
29 views

Trouble inputting interger values into an SQL statement within ArcGIS

So I am defining a function for use in a ArcGIS tool that will verify attributes, catch errors, and obtain user input to rectify those error. I want the tool to select and zoom to the segment that is ...
2
votes
1answer
29 views

Calculating slope for points with downhill slopes rendered as negatives in ArcGIS

I have a DEM and a series of points. I'd like to measure the change in slope along the series of points. Distinguishing between uphill and downhill slopes matter to me, and ArcGIS' slope function ...
2
votes
0answers
32 views

Adding text background color using ArcPy?

Is possible to add text background color using python on ArcGIS (ArcMap 10)? I wrote a function that able to change font color of the string but I want to add background color to it as well def ...
2
votes
1answer
75 views

Why is Python AddIn toolbar showing all “Missing” tools/buttons?

I am horribly new to coding with python. I made a toolbar using the wizard and old bits of VBA code. I created a button to search by map number, a tool to calculate area from UI and a second tool ...
2
votes
2answers
152 views

Arcpy error: ERROR 000732: Clip Features: Dataset xxx does not exist or is not supported

I've been working on a project. A small part of it is to clip point features by ellipse polygons. I need to loop through a set of IDs, when I call "clip" function via arcpy, a very strange error ...
0
votes
1answer
41 views

Using sublime text for Arcgis or Arcpy?

I have installed python 27 in one directory c:\program files\python27 and arcgis 10.2 in another directory c:\program files\arcgis, and within this folder there is c:\program ...
1
vote
2answers
52 views

AddIndex_Management throws maximum open cursors exceeded

The following script is run to create indexes across all the feature classes within a particular dataset: import arcpy import os.path def listFcsInGDB(): for fds in ...
0
votes
1answer
40 views

How do I specify a spatial reference when using da.InsertCursor?

When using an InsertCursor, I can specify a spatial reference per http://resources.arcgis.com/en/help/main/10.1/index.html#//018v0000002z000000. I'm using da.InsertCursor because that's what everyone ...
2
votes
1answer
74 views

Why is arcpy.CalculateField_management() writing 1899-12-30 00:00:00 instead of expected date?

I'm using ArcGIS 10.3.1 for Desktop to test before writing an answer to How to enter date with arcpy.GetParameterAsText with arcpy? I have written the test code below that I am running against a test ...
0
votes
0answers
21 views

difficulty populating date field with arcpy [duplicate]

Here is my date variable in the class "rropthema": erfdat ="'31.12.2007'" Here is the arcpy code: arcpy.CalculateField_management(fc, item, rropthema.erfdat,"PYTHON") Here is the error: ...
1
vote
1answer
28 views

XML Document points to the wrong location after using arcpy.BatchProject()

I'm trying to reproject a number of shapefiles representing contours from NAD_83_Albers to NAD_83_UTM_Zone_9N using arcpy.BatchProject(), but I have to use python/regex to preserve a particular file ...
3
votes
3answers
69 views

Using boolean parameters in Python Script Tool of ArcPy?

I'm using ArcGIS for Desktop 10.3.0.4322 I have a script tool which requires a parameter (folder path to a gdB, via GetParameterAsText) so that a later process can be saved there. The thing I want to ...
-1
votes
1answer
37 views

Feature Attribute Count Script

Using an arcpy script how do I get the feature attribute count per feature class in a fileGDB? Ideally I would like to output to a spreadsheet, with the feature class name in one column and the ...
0
votes
0answers
28 views

How to change the default field names while processing dissolve?

I need Count, Max and Min values when running Dissolve in a model builder. In the resulting tables, the name for the count values are "Value_COUNT", but the names for the max and min values are the ...
0
votes
1answer
24 views

Select by attributes from a series of feature classes

I have 16 feature classes. What I want to do is to select by attributes each feature class using this statement: "Shape_Area" < 1100 Is there a way to do this by batch using arcpy or ...
0
votes
1answer
29 views

Arcpy Append doesn't work with tables

I am trying to get data from table A to table B. But it is important that domains in table B would remain. So I tried to use Append, but it doesn't work with tables. Any ideas?
3
votes
1answer
19 views

Problems with Reclassify and RemapRange in ArcPy?

I'm having a bit of trouble with a script that uses ArcPy. I keep getting the following error: ExecuteError: ERROR 000622: Failed to execute (Reclassify). Parameters are not valid. ERROR 000628: ...
1
vote
1answer
73 views

How to use script tool in python add-in wizard

I am trying to use a script tool in python add-in wizard to make a toolbar which will have button options. The script tool is working fine in the toolbox and I am using them in arcgis 10.2.2. The ...
1
vote
2answers
66 views

Use Python to Find duplicate values in a feature Class and populate a field

So I found this python script on another post here and was trying to adjust it for my needs. I'm a very novice python user so I'm struggling with how to modify the script. I have a Feature Class ...
1
vote
1answer
49 views

Python toolbox - keep parameter value updated after re-altering parameters

I am writing a Python toolbox with (among other) 3 parameters: 2 boolean (check boxes) and 1 string. The string parameter's properties depends on the 2 booleans' value: If at least the first boolean ...
0
votes
2answers
47 views

Comparing field values of two feature classes using ArcPy?

I have an intermediate fc #1 that contains data that I would like to append to my production fc # 2(final output). When working with the data, I would only like to append data from my fc # 1that is ...
-2
votes
1answer
48 views

Fail to publish GP as a service

I have no idea what the issue is here, I created this scripting tool which works fine when I run it through ArcGIS desktop. However, for some reason, I am unable to publish the tool as a service.The ...
0
votes
0answers
34 views

Validating derived parameters for ModelBuilder and Python Toolbox?

I'm working on a tool in a Python toolbox and I'm running into trouble getting the output tables to work in ModelBuilder. The tool takes an input table view and ultimately uses the Table Select ...
2
votes
1answer
64 views

QGIS Plugins & Tools that replicate Select ArcPy Tools

I developed a complex python application for road generation from GPS Devices that uses a few Arcpy Tools. I want to try and replicate this Applications functionality using a freeware like PyQGIS ...
0
votes
3answers
64 views

How to use Select Layer by Attribute in ArcPy

I want that one variable takes input from the user and then we compare the value to the attribute. val = input("Ask user for something.") arcpy.SelectLayerByAttribute_management("Sample", ...
0
votes
1answer
70 views

Draw polygon with GUI

I'm looking to make a python add in tool for ArcMap to draw a polygon. Eventually I want the tool to also calculate the area and a bunch of other things but for now I would be happy just drawing an ...
0
votes
0answers
33 views

Porting Arcpy script to linux cluster machine?

I wrote a series of arcpy scripts, and I am wondering how I can port the feature to Linux cluster machine? I found that ArcGIS server 10.2 runs on Linux machine, does that means I can theoretically ...
0
votes
3answers
63 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
58 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
vote
0answers
35 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
41 views

Update Cursor with Date Issue [closed]

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
28 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
84 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
55 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
39 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
28 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 ...
4
votes
1answer
130 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
36 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
28 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
39 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
37 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 ...
2
votes
1answer
57 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
22 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
31 views

Common Tasks on ArcGIS Server REST service

I have a published REST service with line geometry. 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
30 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
121 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
44 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
54 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
57 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
40 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, ...