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)

1
vote
0answers
42 views

ArcPy Dissolve Statistics Fields - fixed into variable

How can I change this fixed POP column into my variable: field = parameters[1].valueAsText. It says syntax error everytime. StatField = "POP MIN;POP MAX" arcpy.Dissolve_management(in_features, ...
1
vote
0answers
38 views

Feature Layer parameter showing only Polygon Shapefiles

I have created a Python Tool in ArcGIS where most of the paramaters musts be ONLY Polygon Shapefiles. You can also look on my previous question: Filter the Feature Layer parameter in Python Script ...
1
vote
0answers
51 views

Arcpy create feature class representation

I have written a script which allows me to select multiple feature classes and apply both a representation (based on a template layer) and set a transparency value before adding to the map. ...
1
vote
0answers
164 views

Python with ArcGIS: import scikit-learn fails (bad numpy.dtype)

I am trying to install scikit-learn 0.17.1 (current) into my Python 2.7.3 that accompanies my ArcGIS 10.2. The installation through easy_install goes through smoothly, but I get the following error on ...
1
vote
0answers
61 views

Select Layer By Location (Management) gives different result in ArcPy and ArcMap?

I have two line Shape files. When I use the Select layer by location tool to select two intersecting lines, it works fine and selects only lines which are actually intersecting. But when I use this ...
1
vote
0answers
67 views

Adding multiple fields to feature classes in enterprise geodatabase using ArcPy?

I am very, very new at python and am trying to put together a tool that can be run on an enterprise geodatabase that will add a series of fields to each feature class. So far I have only been able to ...
1
vote
0answers
31 views

Size of the Output Files Cannot Match After Converted From Polygon to Raster

Basically, the emodisfile is the raw data file, and shapfile is one of the CLU shape files. I need to convert the shapefile from polygon to raster and then to ASCII file based on the emodisfile. So I ...
1
vote
0answers
51 views

delete feature classes with a similar name in arcpy

I have a script that does a dissolve on polygons with a common field. I'm only interested in keeping the outputs that contain more than one polygon. I'm new to python and having trouble writing a ...
1
vote
0answers
97 views

How to automatically run python code at the time when a mxd is saved?

I am trying to find a way to execute a few lines of (preferably python-)code whenever I save a specific mxd (my template.mxd) I'm working with arcgis desktop 10.3.1 (advanced, all extentions) What I ...
1
vote
0answers
49 views

Arcpy - Why does multi_user_mode have to be False in an edit session on non-versioned dataset?

I'm in the process of implementing Mintx's answer to my question What would cause a geoprocessing service to say "Cannot Open 'FeatureClass' Failed to Execute"? However, I had ...
1
vote
0answers
34 views

A mesh points for each polygon: how to create function?

I want to use function for creating a mesh point for each polygon, but I am new in python. what is wrong with the function: def creatingPoints(minX, minY,maxX,maxY,number): while minY < maxY: ...
1
vote
0answers
64 views

Looping spatial join in arcpy - order problems

I developed a python script where the user inputs a polygon shapefile multiple point shapefiles and within the script the polygon shapefile is divided into 1000mx1000m grid cells and the point ...
1
vote
0answers
33 views

Can't display raster in mxd as RGB

I have a script that iterates through a folder of jpgs, clips them to a grid, inserts them to an mxd, and exports them. My original problem was when I added the clipped raster from a standalone script ...
1
vote
0answers
85 views

Create symbology for new layer using Python (arcpy.mapping)

I have some ArcMap addin that creates new layer and add it into table of content. I need to set up a symbology for the newly created layer based on the attribute table (three differnet values > three ...
1
vote
0answers
67 views

How to display geoprocessing service results in an ArcGIS Online Map?

I am implementing a python script that filters features in a feature service. For this I used the following lines of code: import arcpy # URL with service, where clause and field parameter baseURL= "...
1
vote
0answers
37 views

How to transfer SQL variable back into ArcPy script?

I am trying to teach myself to access sql tables from an ArcPy script as part of a larger QC process. I am fairly certain that I have the sql statement correct (it works in SQL Server, albeit ...
1
vote
0answers
96 views

con statement outputs using arcpy.sa.Con doesn't ignore NoData

In ArcGIS 10.2, using the Con tool, I ran a conditional statement to return RasterA where RasterB value >0. That worked fine. Transferring the code into python, the statement reads something like: ...
1
vote
0answers
107 views

Using ReportLab with Arcpy

I am having some issues creating a geoprocessing service within arcmap using reportlabs pdf toolkit. The script runs fine outside of arcmap, however when i try and run it in arcmap to publish as a ...
1
vote
0answers
91 views

Arcpy doesn't recognize spatialite tables after editing with QGIS

I'm working on a project that would like to use spatialite as a go-between for field edits using QGIS/IntramapsRoam and then loading the data to a file geodatabase. The workflow is as follows ...
1
vote
0answers
72 views

Using row.setValue() function with arcgisscripting?

I'm trying to set column value NULL. I tried different ways to do that, I used CalculateField_management and UpdateCursor but i did not get success. when i used CalculateField_management. It says ...
1
vote
0answers
69 views

Creating Flooding depth Rasters at every feet

I am explaining the issue I am facing to automate the process. I have created a DEM from LIDAR and the Asset elevation is incorporated into the surface. Purpose of this task: Once I get the new ...
1
vote
0answers
99 views

Correctly Setting Spatial Reference for Geometry Objects when Geoprocessing

I'm attempting to find the nearest distance between a set of points, and a set of polygons. I don't want to use near tables because I have to do this operation for a large number of different ...
1
vote
0answers
33 views

Using arcpy to add several rasters

I need to do some raster/vector processing on some non-overlapping tiles. My python script needs to find the correct tiles and then extract the raster values and count them up. My script needs to be ...
1
vote
0answers
31 views

Counting Subdatasets in GRIB using ArcPy?

I'm trying to utilize the extractSubdataset_management tool on a large set of GRB files. Each GRB file has a different number of subdatasets. Is there any way to execute this tool on all subdatasets ...
1
vote
0answers
50 views

Zonal histogram script VALUE row suffix problem

I'm running 2 Python scripts. The first it is to apply Zonal Histogram to several rasters. The second it is for saving the Zonal Histograms to a text file. My problem is when the first script creates ...
1
vote
0answers
91 views

Overwrite existing Map Service through ArcPy keeping the existing cache tiling scheme

This is a follow-up question to Overwrite existing map service in ArcGIS Server 10.1 (through ArcPy) The issue arises when I try to overwrite a map service that has a cache already defined. If I ...
1
vote
0answers
128 views

TypeError: unsupported operand type(s) for *: 'numpy.ndarray' and 'numpy.ndarray'

I am trying to insert a value for different group of percentile eg (0- 10 percentitle) value = 1. I saw an example over here and went to try it out How do I Calculate Grouped Percentiles or Batch ...
1
vote
0answers
47 views

Using arcpy.Geometry() and attribute table?

I have Polygon layer (*.shp) and I need to calculate shortest distance between every polygon's and save it into a txt file with ID (it is in attribute table) for every polygon. example of txt file - ...
1
vote
0answers
58 views

Calculating areas in metric units on polygons that are stored in geographic coordinate reference system using ArcPy?

If one uses arcpy to calculate areas for a field in metric units on a polygon shapefile in a geographic coordinate system it will work, and give you plausible results. According to the documentation ...
1
vote
0answers
97 views

Automate multiple repetitive ArcGIS 10.2 Table Relates?

I have a situation where multiple users will be creating many file gdb's in ArcGIS 10.2 using just the basic license. The data format is standardized and will have a feature layer with point data and ...
1
vote
0answers
56 views

Changing label symbology in ArcPy?

I'm trying to change the default symbol (font, halo etc) for labels of a layer that I am adding to an mxd. Below is what I have so far, but the template layer font style didn't show up in the map. ...
1
vote
0answers
43 views

Dividing points into Polygons based on an Attribute of that point and its relative distance to other points and a facility

I have random point data (school locations) that I need to divide into 'n' polygons (regions) based on: their distance to a facility, their relative distance to each other, and an attribute of that ...
1
vote
0answers
86 views

How to create 10 day averages of a multiyear daily raster time series?

I have a set of daily modis LST rasters (.tif) over a roughly 13 year period (2002-2015). I would like to group them by 10 day periods, i.e. bin 1 = julian day(jd) 0-9, bin 2 = jd 10-19, etc so that ...
1
vote
0answers
246 views

Runtime Error: Cannot Open Feature Class in Editor Session

I am using an update cursor in a script and need to make edits from arcpy.da.Editor. The error that is being thrown is a Runtime Error where the feature class cannot be opened. import arcpy import ...
1
vote
0answers
107 views

Setting field defaults/domains based on subtypes

I have a rather complicated FeatureClass, in which one of the fields has a different default value, and a different domain, depending on the value in the nominated SubType field. Using the rather ...
1
vote
0answers
68 views

How do you use the setErrorMessage(message:string) within the ToolValidator Class?

The Programming ToolValidor Class ArcGIS Help menu states that: the following method: setErrorMessage(message:string) "Marks the parameter as having an error (a red X) with the supplied message. Tools ...
1
vote
0answers
87 views

Using the 'Mean' mergeRule with a spatial join

I have two feature classes. The first is a point file, derived from a raster, with the values for slope of the terrain. The second is a shapefile of polygons. What I want to do is spatially join the ...
1
vote
0answers
44 views

PyScripter auto-complete pop-up help?

How do I get the pop-up help window that's part of the auto-complete to show more definitions of the tool being used? For example in the attached image the definitions of "Buffer_analysis" inputs ...
1
vote
0answers
72 views

How to align hundreds of rasters quickly

I'm hoping to accurately align hundreds of aerial images that are slightly off-kilter. The images cover the same area on different dates (several acres). They contain identifiable features around ...
1
vote
0answers
38 views

surface area in a basin with reference to incremental height of DAM

I want to calculate "surface area in a basin with reference to incremental height of DAM" i tried this: step_size = 10 # metres; reduce this if you want finer resolution num_steps = 20 # increase ...
1
vote
0answers
20 views

Bringing Alias properties with Feature Class to Feature Class Tool?

I am using arcpy.FeatureClassToFeatureClass_conversion(fc, outWorkspace, fc) to move many FC's to a new location. I have found that it is only bringing the FC Name property and imposing that on the ...
1
vote
0answers
76 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
0answers
31 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 (...
1
vote
0answers
79 views

Extract multiple grids from HDF with subset tool using ArcPy

This should be fairly simple thing but bugging me at the moment. I have ~5k HDF files in a folder with names: MOD11A1.A2001001.h24v05.005.2006343042921 and so on..... I have following which loop ...
1
vote
0answers
35 views

Sorting cursor made of Network Analyst outputs?

I have solved OD Cost Matrix analysis and I'm trying to access the results using da.SearchCursor with SQL sorting. The problem is that the result is not sorted at all. lines = arcpy.da.SearchCursor('...
1
vote
0answers
97 views

ArcPy reading a raster in a moving window?

I typically read large raster data using gdal and setting up a moving window of 256*256 pixels (for example). I recently had to do some processing using arcpy, so I did the same thing, using arcpy....
1
vote
0answers
174 views

How to automatically generate pour points along stream network?

The following screenshot shows the results of a water flow analysis where I identified stream order via the Strahler method in ArcGIS. Now I need to generate watersheds for 2nd order streams and ...
1
vote
0answers
46 views

Why is arcpy ChangePrivileges_management adding a second feature class to map?

I am new to GIS and pretty new to python, so sorry if this is ugly code. I am creating a feature class in a postgres database if it does not already exist and the user wants it created. That works ...
1
vote
0answers
252 views

Extracting color values from layer to build index using ArcPy/ArcMap?

My university wants the maps we create to become more standardized and so we're changing all the colors on our base vector map. The new standard needs to be indexed and I have the task of creating ...
1
vote
0answers
76 views

Clipping Feature Classes by Data View Extents with ArcPy?

Have a fully functional script about 90% of the time. It is that 10% that is really bothering me and I cannot seem to deduce a solution. Script will take the user defined dataframe view extents and ...