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

learn more… | top users | synonyms (1)

2
votes
1answer
48 views

arcpy handling of floating points

This arises from my own question How to handle coordinates accuracy in ArcGIS where I have tried to use the documentation entitled Using geometry objects with geoprocessing tools as a reference. I ...
2
votes
2answers
66 views

Using Python to count records and show difference

I'm trying to find an example of a python script for ArcGIS 10.1 that will get count of a FC in my SDE and get count of a FC in an incoming FGDB update and then write the difference to a log file. We ...
0
votes
1answer
30 views

GPRecordSet in python toolBox

I would like to use a GPRecordSet in my python toolBox as an output parameter. This geoprocessing will be share on my ArcgGIS server and in my ArcGIS portal. I haven't see any documentation on how to ...
0
votes
1answer
32 views

Map To KML does not work with mxds that contain service layer

I am trying to use the map to kml conversion tool in a python script. The mxd I provide as input, contains data coming from map service layers. I have no security enabled to that particular layers. I ...
1
vote
0answers
43 views

ArcPy Datadriven Page AttributeError: PageLayoutObject: Error in executing ExportToPDF

I have been working on this script for a while now and even ESRI are being difficult. Essentially I am trying to export a series of datadriven pages. Executing on a single page fine no issue, ...
0
votes
1answer
34 views

Arcpy:Set min height for contour area, with surrounding contour lines

I'm trying to create a tool that will calculate the min depth and the max depth of a contour polygon, based on the value of the depth attributes of the surrounding contour lines. This is what I have ...
1
vote
2answers
59 views

converting csv to dbf

I have a python created CSV that I am looking to turn into a dbf but it is not getting read properly by the TABLE TO TABLE conversion tool. I select the csv, set the output to be XXX.dbf but the ...
0
votes
1answer
28 views

pandas.to_csv to write arcpy.getrasterproperties returns

I'm stumped on how I can use pandas.to_csv for this application. I'm trying to first write a csv then append the csv within the for loop so that every iteration appends a new row. Thanks in advance. ...
0
votes
1answer
26 views

Raster Calculator or Local-Combine tool? (in ArcPy)

i have 3 classified rasters and i wanted to use the following query from r. calculator: (rclslope>=45) & (rclmosaic>=2000) & (rclfocal>15) to arc.py how can i write it? Is it ...
0
votes
1answer
32 views

Using arcpy to separate surface objects mixed into one file into different shapefiles

I'm trying to do some elementary tasks with arcpy and ArcGIS, namely separate some information in a file into separate shapefiles based on values for a field. My initial file has a field called ...
0
votes
1answer
71 views

Looping through Layers, Add Layer to MXD, Export Image, Repeat, using ArcPy?

ArcGIS 10.2.2 I am trying to loop through a list of layers in a folder, add each layer to an mxd and export an image of the added layer. I have added arcpy.mapping.RemoveLayer to the script to remove ...
1
vote
0answers
46 views

ArcPy QueryPointAndDistance: Incorrect Lengths?

Background: I'm currently trying to determine the chainage (distance m) of my points along a polyline (i.e. proposed railway alignment). A colleague within my firm assisted me with the following ...
1
vote
2answers
81 views

ERROR 000732 from ArcPy?

What is the problem since i have "test_script" folder extant in C: but arcpy detects as a truncated one (i.e est_script) and signals error.
0
votes
1answer
64 views

Is it possible from the list or np.array, updating the table using arcpy.da.UpdateCursor?

I have created array. Is it possible to update an existing table if the number and order of columns and rows identical? In the array do not have a column headers. for example: array = ...
2
votes
2answers
58 views

Determine feature class's feature dataset

Is there a way to check if a feature class full path string is a path to a feature class within a file geodatabase feature dataset in arcpy? For example: C:\test\test.gdb\testdataset\featureclass ...
0
votes
1answer
41 views

Missing labels when using arcpy.mapping.ExportToPDF

I have a script that is run on a daily basis to export a folder of MXDs to PDFs and I have noticed some peculiar behavior. Many, but not all of the PDFs will be missing some labels or their label ...
1
vote
0answers
86 views

Calling a GP service from a GP service arcpy.Importtoolbox

I'll try my best not to sound like a lunatic as I explain this. I have a python script that calls an ArcServer geoprocessing service toolbox with arcpy.Importtoolbox. The GP service is on several ...
1
vote
1answer
86 views

Running Python toolbox tool both standalone from other tools within same Python toolbox?

I have created a python toolbox for work that has two tools inside. These tools use the toolbox template and so have a init, getParameterInfo, etc. I want to be able to run one tool both stand alone ...
0
votes
1answer
44 views

Check field type and execute depending on it using ArcPy?

I had a script that converted data from a clients site to a usable GIS format until they changed the output. I've tried two different directions with no luck. Due to how an earlier part of the ...
1
vote
0answers
63 views

Data Driven Pages Export Issue [closed]

I have created mapbooks using DDP and am running into an exporting issue. I have 40 mapbooks of 40 different cities based on a my layer file called "Custom Grid". When I go to export it gives me the ...
2
votes
2answers
93 views

Multiply Rasters from two subfolders

I have two subfolders with Rasters named with the same parameters. I am trying to figure out a way to Loop a multiplication of each raster into a folder with its pair of the other subfolder. Looks ...
0
votes
2answers
47 views

Zonal histogram for each region (row) in a polygon (table) with python script

I have DEM.tif (symbology uses equale interval - 100m) and a polygon file (regions.shp) with many regions (names are defined in 'reg_name' column). I would like to use Zonal Histogram to produce ...
1
vote
0answers
58 views

Creating TIN, Surface Difference python script with ArcPy?

I have been trying to develop a master script to go through a series of geoprocessing tools and executing them. I am trying to generate a TIN and contours from a raw xyz file. Below is a very simple ...
1
vote
2answers
70 views

Exporting ArcSDE feature classes into file geodatabase with ArcPy?

I would like to use Windows task scheduler to automatically (monthly) create a new file geodatabase and then export feature classes from SDE into the new file geodatabase. Im using this code, however ...
1
vote
1answer
41 views

ArcSdeSqlExecute ArcSDE Error -65

I am trying to Select certain fields, resulting from a join using ArcSDESQLExecute but encounter the following error when I try to include the Shape field: AttributeError: ...
1
vote
0answers
36 views

ArcSDESQLExecute to query and update from multiple SDE Databases

I am trying to use ArcSDESQLExecute to return the results of a join and then write the return query into a Feature Class located in a different database. Using Microsoft SQL Server and Arc10.2.2 Is ...
0
votes
2answers
49 views

how to make clusters from small polygons with constraint of boundary touching?

I want to make some clusters from a bunch of small polygons with the constraint that each basic unit (polygon) in the resultant cluster must share a portion of its boundary with at least one other ...
1
vote
1answer
40 views

Is it possible to get column names from an ArcSDESQLExecute SELECT execution

I am running ArcGIS 10.0 desktop and querying an Oracle 11g database and writing the results of a SELECT statement out to a CSV file. Everything works great; however, I would love to find a way to ...
0
votes
1answer
51 views

Error submitting job Arcgis server

I am trying to execute service tool that written in python with arcpy. When I am executing the service I got submitted... Executing... Failed. I looked the logs, and I got there: Failed to ...
1
vote
0answers
85 views

How to create an expression using the arcpy.SearchCursor? [closed]

Example: On the basis of the table which is not defined by the number of columns and rows, you need to evaluate expressions as shown, using the arcpy.SearchCursor .... First, create a list of ...
0
votes
1answer
68 views

Inserting row into table and then updating it in sum of each column using ArcPy?

My problem is the following: I have a table with an unknown number of columns (n) Use arcpy.ListFields create a list of columns and generates Field name list Then, using arcpy.da.InsertCursor create ...
2
votes
1answer
51 views

How do I update common fields in multiple feature classes with ArcPy?

I have a piece of code that I can use to update several fields in a specific feature class. I would like to use this code to update all of the feature classes in the data set. The data set would ...
1
vote
1answer
52 views

Extract area of polygons inside larger polygon and sum their values to a new column

I have two landcover classifications (as shapefiles) created using eCognition. "Level0 (FID)" consist of larger polygons and "Level1 (FID, ClassName, Area_Pxl)" of smaller polygons within these. I ...
2
votes
2answers
145 views

How do I count occurrences of unique field values?

I have a feature class with a field which contains values 1, 2 and 3. I need to write code that reports the total count for each value: 1: 29 features 2: 52 features 3: 57 features ...
1
vote
0answers
18 views

Changing Area Output - PUMAS

I currently have shapefile of US PUMAS and another feature shape file (call it feature X). I am using arcpy to project both of these files to the following projection coordinate system (using ...
3
votes
2answers
152 views

How to calculate a value based on another field under arcpy.da.UpdateCursor and cursor.updateRow?

I am trying to do a calculations under arcpy.da.UpdateCursor. I want to calculate the values for the records that have FIPS=06037. I want to take the values from "kg" column and populate the new value ...
1
vote
1answer
110 views

Limit of Python Add-in for Arcmap?

I am running ArcGIS 10.2.2 Version 10.2.2.3552, using ArcMap. I've watched the tutorial here (http://training.esri.com/Courses/ts_PythonAdd-Ins/player.cfm?) and I'm still not understanding this. I ...
1
vote
1answer
69 views

how to find that two polygon boundaries are connected?

I am working on a Geo database where there is a layer with many polygons. i want to find that which polygons boundaries are connected so that i can create new layer from that polygons and which ...
3
votes
3answers
150 views

Creating polygon from 2 txt files (Parent ID + Coordinates)

Here is what I am trying to do: I want to create polygons based on two separate text files: the first one (as parents) lists the Polygon ID (ID_el) and three to four Points ID (IDpt1, IDpt2, IDpt3..) ...
0
votes
1answer
34 views

add-in works at once only

There is a sample in ArcGIS 10.1 help on creating a add-in using python. This works only once when a layer is selected in combobox, if i need to use this functionality again it does not work and i ...
1
vote
0answers
77 views

arcpy, CalculateField: 'geoprocessing sys.stdout object' object has no attribute 'flush'

Working with 10.2.2, 64bit geoprocessing arcpy installation. Getting this error from arcpy.CalculateField_management() command. From Spyder IDE in an ipython console, I get the error: [IPKernelApp] ...
-3
votes
1answer
38 views

Extracting script of tool in ArcGIS? and combining the tools join by attribute and join based spatial location?

my subject is to match between two data bases related to cartography details and second toponomy. I have ArcGIS 10.0 and I want to combine the tool of join by attribute and based by spatial location. ...
2
votes
0answers
99 views

Arcgis arcpy toolbox multiply files: error - module object has no attribute

I have a big .pyt script (python toolbox) and now i trying split it to many files (1 file - 1 tool). In single .pyt file everything works perfectly, but when file is splited i get this message: ...
2
votes
1answer
93 views

Using ArcPy to Read from Excel Spreadsheet to Python Dictionary

How would I go about creating a script that reads a specified excel spreadsheet and places the values in a dictionary? I have read about the xlrd library and how the library in such endeavors to read ...
1
vote
1answer
38 views

Getting error in running ExportReport Python code in ArcMap

i am unable to generate pdf report using ExportReport function of Arcgis 10.2. getting error of IOError: Could not open report template tried different template files but still getting this error. ...
1
vote
2answers
49 views

How to remove repetitive text in attributes?

I would like to clean up fields that contain repeated "Street Names". As seen below, I have fields "Name_From" and "Name_To". These fields sometimes repeat the same name (highlighted). I would like to ...
2
votes
0answers
30 views

Algorithm to put label of bounds (bounds layer) inside of polygons (polygon layer)

I hope to put labels of bounds inside of the polygon in intersection with like you can see in the picture below I checked multiple solution as a topology or maplex but it doesn't give relation ship ...
1
vote
1answer
69 views

arcpy.da.UpdateCursor - How to update last column from Field Name List?

examples: for field in arcpy.ListFields(fc): if field.name != 'Hi': arcpy.AddField_management(fc, 'Hi', 'FLOAT') else: print "kolona Hi vec postoji" with ...
1
vote
1answer
70 views

arcpy.da.UpdateCursor - how to make multiplication of each column with the selected column, for each row in particular?

If I have a table with a number of columns [col1, col2, col3 ... col_n] how to perform multiplication of each column with one selected column, for example: multiplication = col1 * col_def, ...
1
vote
1answer
46 views

Which arguments are incorrect when running ArcGIS example for arcpy.mapping.ListBookmarks and eporting to PDF arcpy.mapping.ExportToPDF?

I want to use the bookmarks in ArcMap 10.2.2 and 10.3 MXDs to loop through the bookmarks, zoom to the extent of said bookmark and then export a PDF by renaming the PDF with the name of the bookmark. ...