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

calculating first quarter of a raster by zonal statistics

I want to calculate the 1th quarter of raster values (beneath polygons) by zonal statistics but it does not have quarter. Zonal statistics has :MIN, MAX, MEAN, MAJORITY,RANGE,.... and does not have ...
1
vote
2answers
47 views

calculating sinuosity of each road segment

I want to calculate the sinuocity of each road segment of a vector shapefile which contains roads. I have downloaded the python script from enter link description here but I don't know what to do ...
0
votes
1answer
37 views

Combining two search cursors (one for table and other for feature class)?

I have a problem from combining two search cursors (one for a table and other for a feature class), there are missed records in the first table, that have not been considered by the first search ...
1
vote
2answers
29 views

TypeError: list indices must be integers, not str when trying to calculate new records in several fields

I am trying to calculate new records in several fields by looping through each field in a list and dividing the value of each record by its shape area. My code is as follows: inFeature = outFeature ...
1
vote
0answers
27 views

Arcpy standalone script: Tool is not licensed error [closed]

I'm trying to execute a standalone python script using arcpy and spatial analyst extension. I've arcmap installed with a trial license. The script is the following: import arcpy,arcinfo import sys ...
0
votes
1answer
22 views

Dynamically editing items in combobox of Python AddIn?

I'm trying to dynamically edit the list of items in a combobox I made using python add in for a toolbar I'm working on. The list is calculated by another button. Here is the relevant code: class ...
1
vote
1answer
33 views

Select By Attribute and Export with Arcpy

I have 4 folders with shapefiles in them, and for each folder I am selecting by attribute and then exporting the new shapefile. My code runs with no error but the output folders have no files in them ...
1
vote
1answer
32 views

Applying symbology to raster layer in ArcPy without using symbology layer (layer file)?

I have a raster layer with 3 unique values (1,2,3) and I want to apply a unique color to each using RGB values or hex codes, without the use of a symbology layer (layer file). Is it possible to ...
0
votes
0answers
35 views

ReplaceDataSource of SDE layers in map documents (mxd) with old feature classes newly organized under feature datasets in the same ArcSDE

I need some help to replace the data source of old SDE layers in the map documents. The replaceDataSource method in the code below is not working properly resulting in a broken link of the target ...
1
vote
0answers
19 views

Retrieving user information in ArcGIS Server token protected geoprocessing service using ArcPy?

I have a geoprocessing service on ArcGIS server 10.3 that is protected with tokens. This GP Service is a python script. Is it possible to retrieve the user information, such username and password, ...
0
votes
1answer
17 views

Avoiding unexpected raster search with Python script?

I am trying to write a python script that will find all raster files in my server including 'GRID'. Here is my sample script: import os import arcpy path = r"F:\Geodaten" for root, dirs, files in os....
-3
votes
1answer
53 views

Code Works in Python Window but not Script

This code successfully completes inside the ArcMap Python window but fails as a script with identical code in a toolbox. The source data is a collection of feature classes directly inside an ...
0
votes
0answers
28 views

Arcpy date does not match format at midnight

I have the following code that works well except when the VALID field's last 4 digits are 1200. For example, a VALID attribute of 201607131200 becomes a DateTemp1 value of 7/13/2016 (I am subtracting ...
0
votes
2answers
44 views

While loop in Map Algebra ArcPy, associate output raster name with input raster

I have an Arcmap document open with Landsat images from one day in different bands as rasters. They're named: LC80541162014003LGN00_B1.TIF LC80541162014003LGN00_B2.TIF and so on, B1 through to B9 (...
0
votes
3answers
78 views

Building python script to compute monthly average from 8 days MODIS data

Goal- Building python script to compute monthly average from 8 days MODIS data I have MODIS data which is contain 8 days product. Some of month has 3 images and some of month has four imgaes. So how ...
-1
votes
1answer
35 views

Convert projection Toolbox ArcMap 10.2

I'm having trouble with a toolbox based on a python script that converts the projection of shapefiles. I want to choose a folder that contains my shp, convert them to wgs84 then put them in another ...
1
vote
1answer
32 views

ArcGIS Server - How to give different permissions to different users or roles?

I have a map service with Features Access capabilities enabled on ArcGIS Server 10.3. This map service is protected using ArcGIS Server tokens. I would like to have two categories of users with ...
0
votes
0answers
11 views

Suppressing ArcPy “This script has no parameters” message? [duplicate]

I'm currently working on a python script from a Toolbox that change the labels in a layer. I was wondering if there is a way to suppress "This script has no parameters" message prior to execution. - ...
1
vote
1answer
30 views

SelectLayerByAttribute not renwing before CopyFeatures

I'm using ArcMap 10.2 and want a python script to loop through a list to make new feature classes, using the list items as attribute values in a selection before copying the features to a new file. ...
1
vote
2answers
101 views

Create a line perpendicular to an existing line in ArcGIS

For an existing set of line features, I would like to generate a perpendicular line, of say 1km, at the midpoint of each existing line feature in ArcGIS. I imagine that The methodology would be to: ...
0
votes
0answers
24 views

Debugging No Free Units (LUNGET) from RasterToASCII_conversion() in ArcPy?

I am converting approximately 20 years of satellite data to ASCII format (.asc) using ArcPy and rather than threading it, I chose to run four instances of the script in four different cmd windows. The ...
1
vote
1answer
25 views

Using arcpy AsShape on GeoJSON file?

I'm new to working with GeoJSON and have been reviewing the ArcGIS page for AsShape, but the examples seem a little thin. I'm currently pulling a WFS from a GeoServer instance in GeoJSON format. I ...
-1
votes
1answer
49 views

Arcpy Data Driven Script no index layer

Problem: Data Driven Pages index layer, which is updated within a python script by replacing the source data, is disappearing when the DDP are later called in the script to export pdfs. Specifically, ...
0
votes
1answer
39 views

Extracting raster value to specific range using ArcPy?

I have multiple rasters with range 0 - 255. I want to extract range from 0 to 100 using Arc GIS python script and after extraction I want to multiply all raster by 0.01 and save it with same name as ...
0
votes
4answers
63 views

Setting selection method in ArcPy?

I haven't found a way of setting the selection method (Create new, Add to current, Remove from current, Select from current selection) in arcpy. Is it possible to do this and - if yes - how? I am ...
-2
votes
1answer
37 views

Printing rows from table but getting error? [closed]

Here is my code. I have no problem printing out one column from a a table but can't seem to get it right in printing two. fc = "C:\Users\Brett\Desktop\lesson_5\Lesson5_Data\Lesson5_Data\COUNTIES.shp" ...
0
votes
1answer
16 views

arcpy create composite address locator

I am making a script for creating address locators and then composite address locator. As I was reading the arcpy help documents I found the syntax here http://pro.arcgis.com/en/pro-app/tool-reference/...
0
votes
1answer
28 views

Loop over attribute table of selected layer

Here's a stab at my first practical ArcPy script. I want to grab a layer by name (rather than by layer order or by file path) in the current MXD, then loop over it's attributes (with a view to ...
1
vote
1answer
57 views

Longest flow length in ArcPy?

I have to generate LONGEST FLOW PATH(polyline) within watershed. What is the procedure to generate this ? After generating longest flow length , I will divide polygon with polyline. I have : ...
0
votes
1answer
63 views

Calculating well densities in selected counties using ArcPy?

I'm new in python and I have no clue how to do this. I am trying to calculate: total numbers of wells that fall into each county in a shape file, and update the county table with the total count. ...
-1
votes
0answers
24 views

Trying to join a column from one table to another using python [duplicate]

So I have two tables, one has county polygons, the other has well Points. I am trying to first calculate the total numbers of wells that fall into that county, and update the county table with the ...
0
votes
1answer
44 views

Automate the un-registering of replica

I'm working on an arcpy script that removes a feature class and then recreates it. The feature class is part of a replica, and I need to recreate the replica as part of the script, however you cannot ...
0
votes
1answer
39 views

Selecting inputs within groups - arcpy

I need help with some python in selecting correct input and near feature classes in Near Table analysis. The project aim is to run Near Table Analysis (distance) on point locations collected at time ...
5
votes
1answer
53 views

Finding SDE permissions on feature class using ArcPy?

I am writing an arcpy script where an SDE feature class is removed then recreated. I need to set permissions on the recreated feature class that match the permissions before it was removed. Is there ...
0
votes
1answer
54 views

Using xlsx with ArcPy?

I am writing a Python script that finds the difference between populations for U.S. counties from one year to another and writes that information to a new field in a xlxs file. Can it be done with ...
3
votes
1answer
31 views

ArcPy UpdateCursor appears to not Update field in open Attribute Table?

I have been trying to get Update Cursor to update a field in my attribute tale. import arcpy fields = ['STATE_ABBR','Last_Update'] fc = "C:\Users\sword\Desktop\GIS Web Course\PersonalProject\...
0
votes
0answers
22 views

Scanning a raster by moving windows. Output rasters off by a cell. ArcGIS, python

I'm working in extracting smaller rasters from a bigger one (yellow). I'm using only python, some numpy maybe. I succesfully extracted a patch from a big raster, secuentially, by moving windows. So I ...
0
votes
0answers
49 views

Using Arcpy in Idle?

I realize there is a similar post to this, but the error for that one is different. I am trying to import arcpy into Idle. I can use it in the python command box in ArcGis but when i try to import it ...
0
votes
1answer
28 views

How can get data unit by ArcPy?

Is there a way to according to the data's spatial reference to get the unit of data, for example: wgs1984 → Decimal degrees, UTM54 → Meters.
1
vote
0answers
36 views

Script to join .csv file to shapefile and export changing column names

I have a shapefile with an attribute table like this: FID Shape ID 0 Polgyon 3 1 Polgyon 3 2 Polygon 3 3 Polygon 3 and numerous csv files which look something ...
1
vote
1answer
19 views

CopyFeatures from one gdb to another

Im trying to create a script that will copy the polygon files from one gdb into a newly created gdb but the files always are generated into the default gdb. ive played around with the "outputs" of ...
0
votes
0answers
21 views

Integrating Microsoft Dynamic GP (Great Plains) data to GIS

Does anyone out there have experience with linking Great Plains data to GIS? I'm researching options for an upcoming project and can't find any suggestions. I'm looking for any kind of export/...
0
votes
1answer
55 views

ArcGIS: Compare 'similar' values between multiple tables

I'm looking to see if there's some code out there I can manipulate, or if I can utilize a model to essentially compare field values between 3 or more tables. The two issues here are I have to ...
0
votes
1answer
55 views

Debugging AttributeError: Invalid destination path from ArcPy?

I'm doing some programming work for a client and we can't seem to get the script tool to work on her end. It works perfectly on my end but when she tries it, it grinds away for a long time and then ...
1
vote
2answers
92 views

Using 2 with statements with arcpy da search cursor

I often see code that is comparing 2 shapefiles where there needs to be 2 with statements in the same loop. In my head I always thought both with statements should be placed first before starting ...
0
votes
1answer
33 views

Single point creation

I am using arcpy.CopyFeatures_management(pointGeometry, "output") to create singles points. Is it possible to create those single points on an existing output without deleting the output before the ...
5
votes
1answer
74 views

Update from/to Z from attributes using arcpy Update Cursor

Trying to update Z values onto some point and line features from the level attributes on each feature. My script works fine on points - the previous Z values of 0 now have the same values as the ...
0
votes
2answers
71 views

ArcGIS 10.3.x - Publishing GP tools as GP services using Python 32- or 64-bit dependencies

Desktop environment: Windows 10 64-bit, ArcMap 10.3.1, Python 2.7 32-bit (installed by ArcMap) Server environment: Windows Server 2012 64-bit, ArcMap 10.3.1, ArcGIS for Server 10.3.1, Python 2.7 32-...
0
votes
2answers
23 views

Raster multiplication script not executing

I built this code to multiply rasters but it will not execute, it gives me the following error: ERROR 000732: Input Raster: Dataset in_raster1 does not exist or is not supported # Import arcpy module ...
2
votes
1answer
22 views

Grid cells group analysis?

I have a grid of cells with different values: I would like to analyze a group of 5 cells to check if they have the same values (group S1 and S3 display same value for all cells, not S2). This ...