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
0answers
34 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
18 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
52 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
43 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
77 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
29 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
100 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
47 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
62 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
36 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
15 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
55 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
38 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
52 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
48 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
27 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
35 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
53 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
91 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
71 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
68 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 ...
0
votes
1answer
31 views

Trying to Run Slope Analysis Script

I'm trying to make a slope raster from a lot of DEM`s. The DEM rasters are in this file Geodatabase C:\Bachelorarbeit\Daten\GIs\Originale\dtk25_dgm1.gdb The slope raster should be saved in this ...
1
vote
1answer
45 views

Extracting small numpy array from a bigger raster, by moving windows. Memory issues. ArcGIS

I'm trying to extract a small raster from a bigger one, just using python and numpy (I'm not allow to use any other software). This code just reads a from a big raster, extracts an smaller window, ...
-2
votes
1answer
61 views

Calculating distances using Python?

I have a shapefile with lat long information of various properties in the attribute. I have to calculate distances from each property to the many amenities such as schools, hospitals, bus stops, city ...
3
votes
2answers
64 views

Distinguishing shapefiles from geodatabase feature class with arcpy.Describe() method?

I have a list of layers (.ListLayers()) taken from a dataframe . In my case the layers can have two types of data source either shapefile or GDB. I want to start different actions depending on the ...
-2
votes
0answers
50 views

Spatial join Python script in ArcGIS 10.2.2 [on hold]

I tried to set up a loop python script for closest spatial join. However, I failed with empty fields (they have data in original shapefile) after the spatial join geoprocessing without looping. I ...
-1
votes
0answers
49 views

Debugging Error 010240: could not save raster dataset to workspace with grid format? [closed]

I'm trying to run a standalone script tool, created on ArcGIS 10.2.2 and it gives me the error: ERROR 010240: Could not save raster dataset to \WG-DATA\sdi-datasets\Pat\WS\results with output ...
1
vote
1answer
21 views

arcpy export data view to jpeg: label size changes

I designed a little arcpy script to export different layers in a data view to jpeg (world files included). It's the first time I actually use arcpy but it works. The only drawback is that the labels ...
0
votes
1answer
64 views

ArcMap: export each x/y coordinates to a separate row [closed]

I am trying to sort out how the coordinates of each point in a multipoint or polyline feature could be exported to a .txt with python so the exported file looks like this: point1_coordinates_x ...