A site-package created by Esri to expose ArcGIS for Desktop (and ArcGIS Pro) geoprocessing, mapping, etc, to Python.

learn more… | top users | synonyms (8)

0
votes
1answer
41 views

Finding field with maximum value and field name using ArcPy cursor?

I was wondering if an equivalent of summary statistics exists for finding such statistics across fields rather than records in a table. For example, of several fields, I wanted to find which one has ...
2
votes
1answer
52 views

How to set a python code to trigger on any update on a feature class

For example, when I have a geometry change on a point, I would like to update the X and Y fields to the new current location, I understand how to make the code, but not where do I set or put it to be ...
2
votes
3answers
111 views

ArcPy find points that are paired in time and space

I have a shapefile that that is time stamped and tracks two animals. I would like to create a field that denotes "together" based on proximity and location. And example of the data is: time ...
-1
votes
1answer
45 views

Trying to copy all feature classes from one folder to another folder using python but it failed to run

try: arcpy.env.workspace = "C:/WCGIS/Geog485/Lesson1" fcList = arcpy.ListFeatureClasses() for featureClass in fcList: arcpy.CopyFeatures_management(featureClass, "C:/WCGIS/Geog485/Lesson2/...
1
vote
0answers
18 views

Dataset C:\msurya\teritory.sd does not exist or is not supported Failed to execute (UploadServiceDefinition)

I am trying to execute the pythonscript code for the automation of a mapservice. While execution tempdraft.sddraft, and updatedDraft.sddraft files are automatically generated but .SD file has not ...
0
votes
0answers
57 views

Data Driven pages to PDF Python

I am trying to get a script to export each selected data driven page to a pdf. Basically I want each page of the data driven pages in its own PDF. I tried using the method from this page https://blogs....
2
votes
0answers
20 views

How to export specific DDPs from a set of DDPs?

I have a set of data driven pages and I would like to have a string parameter in the tool that allows me to export specific pages from the set of data driven pages. An example would be if I had a set ...
1
vote
2answers
28 views

Where are Service Area Layers? How to delete them?

Using arcpy I can make a service area layer in Network Analyst like this: outSAResultObject = arcpy.na.MakeServiceAreaLayer(inNetworkDataset, outNALayerName, ...
0
votes
1answer
54 views

Unable to calculate field correctly using ArcPy

I am attempted to calculate a field in a feature class ("Feat_Class_1", by using the count of selected features within another feature class ("Feat_Class_2") as a numerator, while using the value of a ...
2
votes
1answer
32 views

Debugging FeatureClassToFeatureClass giving ERROR 000732?

I get this Error when trying to run the FeatureClassToFeatureClass_conversion: Traceback (most recent call last): File "", line 1, in arcpy.FeatureClassToFeatureClass_conversion(...
1
vote
1answer
97 views

looping to process multiple files in the same folder using Python

I have a folder with filenames bio1_36.tif, bio1_37.tif, bio2_36_tif, bio2_37.tif, and so on. There are 19 bio variables and 36 and 37 at the end refer to the tile numbers. My goal is to mosaic the ...
0
votes
0answers
28 views

Selecting desirable records from a table and inserting them in another table

I have a shapefile which is the result of intersection between two polygons. In the records of intersection polygon some features in the polygon no 1 has many intersections with no2 polygons and I ...
-2
votes
1answer
53 views

Export field list to excel or csv

I've got the below script and found very useful. But I need the list of fields to be exported to excel or csv. import arcpy #Set workspace environment to geodatabase arcpy.env.workspace = "e:/temp/...
0
votes
0answers
22 views

Generate Near Table equivalent using a cost surface

I'm using ArcGIS 10.3 to calculate the distance from every point in a feature layer (scientific study sites) to the nearest 2 points in a different feature layer (sites infected with a waterborne ...
0
votes
0answers
14 views

Using Extract Multi Values To Points to return OBJ ID not actual attribute values?

This code extracts the OBJECTid from the rasters. Is there a way to obtain the actual attribute values? EMVTP (http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-analyst-toolbox/extract-multi-...
1
vote
1answer
37 views

Finding angle between vertices to estimate curvature in the same feature class using python script?

Background info What I'm attempting to create is an estimation of curvature, by finding the angle between vertices. The vertices layer was created from using the "Split line at vertices tool" on a ...
0
votes
2answers
57 views

ArcGIS, arcpy, SQL expression issue

I have polygon featureclass (BookmobileLocations) which has one field (Marker, data type Text). The field Marker has values (Site 1, Site 2, Site 3...). I want to do query using Select_Analysis.The ...
0
votes
1answer
60 views

How to access output parameters from a Python Toolbox Tool called by .NET?

I am trying to access an output parameter from a Python toolbox tool and cannot find any information about how this is done: I am developing an Esri Add-In for ArcGIS 10.1 SP1 for Desktop (Build 3143)...
2
votes
1answer
56 views

Is it possible to inherit a session in ArcGIS 10.0 through the Python window?

So, I'm still struggling with an ESRI 10.0 installation with an Oracle ArcSDE database. I'm nearing the end .... In trying to programmatically edit the versioned data. It needs to be done in an ...
0
votes
2answers
70 views

Creating a dict with Search Cursor

I need to find how many routes are assigned to each account number in a feature class. I'm using search cursor twice, first to build a set of account numbers, second to get the number of times a route ...
1
vote
0answers
36 views

How do I use a field attribute in the file name of a PDF export?

I've made a script that iterates through a set of data driven pages. Right now I have it that just the ID number of the data driven page is used in the file name to distinguish between each export. ...
0
votes
1answer
27 views

ArcMap highlight features from code

I have a shapefile of lines containing an amount n of elements. I exported these features and analyzed them with another program (Matlab), which provided me as an output a row vector of length n ...
1
vote
4answers
61 views

Iterate through a list to use then use SearchCursor to populate new list

I have a featureclass of buildings. Each one has a unique number ("BO_UNIQ"). I create a list of these unique numbers (1251 elements). I then want to iterate though this list and get facility names ...
1
vote
0answers
22 views

Nightly backup using Import XML Document arcpy ERROR 000791

I'm having some trouble using arcpy.ImportXMLWorkspaceDocument_management to import an XML document into a file geodatabase for a nightly backup routine. The code for the import is as follows: try: ...
0
votes
0answers
16 views

Installing Python 3.4.1 of ArcGIS Pro on machine which has Python 2.7 from ArcGIS for Desktop? [duplicate]

I want to install ArcGIS Pro but have just read it needs python 3.4.1. As I have already ArcGIS 10.3.1 with python 2.7 installed, I was wondering if there will be any complications during the ...
1
vote
0answers
47 views

Pycharm cannot find reference 'SearchCursor' in 'arcpy.da'

Whenever I try to use a search cursor from arcpy in pycharm, I get this unresolved reference error. I should note that it was working fine earlier in the night, I have no idea what happened. I've ...
0
votes
0answers
14 views

arcGIS heatmap of routes, populating counts for shading

im currently making a heatmap in arcGIS of routes, it's creating polyline features of different shades. I used this guide: https://luke-webber.github.io/polyline-heatmap/. however, I cant get the ...
1
vote
0answers
28 views

arcRest Token Required

I'm using the arcRest sample copy_item.py file to save an AGOL feature service. The complete script on ESRI's github page is here: https://github.com/Esri/ArcREST/blob/master/samples/copy_item.py I'...
0
votes
1answer
31 views

I want to create a tool that will search a single field, in a single layer and zoom to that location? [closed]

I have a feature class of valves and another of fire hydrants. Each has a unique identifier field. I want to create a tool that has one dialogue that allows input of a identifier then zooms to that ...
1
vote
1answer
23 views

Creating a Time Aware Population Layer with Point Features

I am interested in using ArcGIS Pro's time aware capabilities to create a time aware map of the populated places for the state of Wyoming from the 1870 Census to the 2010 Census. In the end, I would ...
2
votes
1answer
37 views

Iterate through layers of an MXD

I found this, under the topic How to iterate through layers of an MXD? answered by Midavalo I wanto to know if its possible to change something in the second line, to iterate through all data frames ...
1
vote
1answer
64 views

Geometry Object Intersect

I'm trying to intersect two polyline feature classes and generate a point output using geometry objects. Its intersecting almost 2 million features with 250,000+ features, so running it with arcpy....
1
vote
0answers
24 views

Arcpy code repetition provides slight differences in the outputs [closed]

I made a python script that uses arcpy to buffer some network areas, intersect them with another shapefile, and from this output make some calculations that are saved to an Excel spreadsheet. I run ...
0
votes
1answer
81 views

Filtering parameters in ArcPy Python script tool avoid repeating selecting same value in sequence parameters?

I am trying to make a tool in which there are many sequence parameters (based on the same field of a feature class), and each of them is multi value to make a user choose from a check a list one or ...
0
votes
0answers
19 views

combobox show two layers: selected layer + 1 field of another layer

I am new to Python, I have problem with combobox. When I select one layer of list, I want to show selected layer and near analysis from another table. Or When I select one layer of list, I want to ...
0
votes
1answer
43 views

arcpy perform function on features in feature class

My data consists of a directory of shp files. I'm trying to accomplish the following: Go through each shp file and perform a function on each feature. The way my script is working now, it is ...
0
votes
0answers
41 views

Pure virtual function error on ArcPy

I am running a script to export a series of mxds to pdf via ArcPy in an ArcToolbox tool (code below). I already reduced it to the minimum of code necessary but still, NON REPRODUCIBLE, I get a ...
2
votes
0answers
57 views

ArcGIS Dissolve failing with small polygons

I have an arcpy script which clips (Clip_analysis) a shapefile of polygons to a grid square, converts any multipart polygons created to singlepart polygons (MultipartToSinglepart_management), runs ...
0
votes
0answers
32 views

Borrow ArcGIS 10.3.1 Licenses with Script (Any Language) from License Manager Server

We are trying to create an installation advertisement for our users (we have a lot) to borrow Arc 10.3.1 licenses from a server located elsewhere for a period of time (270 days), and then delete the ...
1
vote
1answer
87 views

Merge Shapefiles and Add File Name to Attribute Table

I am trying to merge lots of point shapefiles together to form 1 large shapefile. What i want to be able to do is get the name of each of the point files to appear in the attribute table either during ...
0
votes
1answer
28 views

Calculate Acos in ArcMap

I am trying to calculate acos in ArcMap (shp) using Python. Here is the code: arcpy.CalculateField_management(fc_Arcs, "Angle", math.acos(0.88), "PYTHON_9.3") If I set the value i.e. 0.88 I am ...
2
votes
1answer
33 views

Extract by mask with multiple shapefiles and multiple rasters

I have two folders, one which is the shapefiles which define the polygons for my extract by mask (there are 33 of them) and one which has my rasters (10 of them). For each of the 33 shapefiles I want ...
10
votes
6answers
1k views

Is there a faster way in python of finding the smallest number in a field?

Using arcgis desktop 10.3.1 I have a script which uses a search cursor to append values to a list and then use min() to find the smallest integer. The variable is then used in a script. The Feature ...
2
votes
2answers
79 views

How to use variable in expression in arcpy CalculateField tool?

I want to use the following expression in the arcpy.CalculateField_management tool. I have a variable called "value" and a field called "Field01" I want to use (value - Field01) / 20 I can´t seem ...
0
votes
1answer
44 views

What parameter's data type is Short integer in arcgis 10.3 model builder?

I am defining a parameter for a python script in model builder. The script calculates a single value from a featureclass using a formular referencing values of a long integer field in the same table. ...
2
votes
1answer
28 views

moving the objects in a feature class by a field within the table of that feature class

I have a feature class and I want to move its objects based on two fields in it I used the following code but get error: with arcpy.da.UpdateCursor(fc2,["SHAPE@XY","centerpo_4","centerpo_5"]) as ...
1
vote
1answer
26 views

How to change just one title when multiple titles are present in mxd?

I have an mxd with multiple titles and I'm trying to write a script that iterates a process that activates a layer, changes one of the titles, then exports it. I've got it all working except for ...
1
vote
1answer
42 views

How to apply symbology from another layer in arcpy

I'm trying to add symbology to a group of feature classes. Listed below is one example. The field names are the same, but the symbology isn't working in arcpy. It does however work when I used the ...
0
votes
1answer
31 views

Setting default gdb from ArcPy?

I created a new gdb by arcpy.CreateFileGDB_management('e:/Rstack', 'new.gdb') arcpy.env.workspace = 'e:/Rstack/new.gdb' But how to set this new gdb as my default gdb by arcpy, without opening ...
1
vote
0answers
44 views

Arcpy: Delete rows from joined table

I would like to delete all rows which are joined to a layer from a csv table. Only the joined records which match (keep only matching records) should be deleted. After the records are deleted, the ...