A site-package created by Esri to expose GeoProcessing from ArcGIS to Python.

learn more… | top users | synonyms (7)

0
votes
2answers
40 views

Updating field in feature class with Search and Update Cursor:Stop Iteration error

I would like to update a field in a single feature class by a.) searching for a field where the values are not blank and b.) searching for a field where the values are blank. A typical scenario of ...
2
votes
2answers
85 views

Increment VALUE column in raster in ArcGIS using ArcPy

I would like to increment the VALUE field in a raster by a constant amount (say 100). I can do this by using reclassification, but wondering if there is a simpler more direct method (using ArcPy)?
3
votes
2answers
169 views

Total count of values at each pixel in a raster stack/ 3d array

If you have an array with x, y and z dimensions, how can I create an array of x, y dimensions that holds a count of how many z values at each location (x,y) are noData? I would prefer to use numpy ...
7
votes
3answers
182 views

Identify and delete overlaping or near lines with similar running

I have shapefiles with lines that shows surface water runoff. I need to clear and simplify these shapefiles by condition that if some lines are near by other and has similar running, this lines has to ...
2
votes
1answer
67 views

Custom Geoprocessing messages/progress indicator Arcgis 10.2 Modelbuilder?

I was wondering if anyone knew a way of customizing the progress indicator for tool developed in Arcgis's model builder. I have a complicated tool, which uses a feature selection iterator, and I would ...
0
votes
1answer
42 views

How to get originCoordinate value in “Create Fishnet” tool

I'm trying to develop a Spatial data processing GUI, one of the step uses the "Create Fishnet" tool. From the toolbox it self, there is a drop down let you select template extent, this way user won't ...
3
votes
1answer
64 views

Is centering existing polygons on a point layer possible?

I'm writing a python script that automates our grid maps at my place of employment. Everything works fine and dandy other than the ocassionally awkwardly placed grids. I've been using Create Grid ...
1
vote
1answer
71 views

How to use variables in arcpy UpdateCursor

I've written a python script (ArcGIS 10.0) for importing point objects from Excel sheets to our ArcSDE database. This works fine, but I'd like to make this script a bit more custamizable by the user ...
2
votes
1answer
133 views

Arcpy Intersect analysis function returns an error when using certain types of strings for input

In an arcpy for the intersect_analysis function, certain syntax works and others don't. What is the reason for this? Works: arcpy.Intersect_analysis("'D:\\Program Files ...
8
votes
3answers
210 views

How to Find out Point which falls between two parallel lines

I am facing one Problem in ArcGIS. I work on a navigation Database. In our database single lane streets are represented by a single Line, while a multi-lane street (Street with Divider in centre) is ...
1
vote
2answers
75 views

Adding output parameter to Python script tool?

How do you add an output parameter in a python script in a toolbox?
3
votes
1answer
92 views

GeoProcessing Tool Parameter: CoordinateSystem vs SpatialReference

So I'm adding a couple tools to my python toolbox. Most of the time I just used CoordinateSystem and leave good enough alone. Today I tried SpatialReference and noticed the result is the same. The the ...
3
votes
1answer
55 views

Programmatically create three mxd's [closed]

Quite often I have to create 3 different exhibits for the same project and it can get quite tedious, I was wondering if there was a way using python, modelbuilder, etc. to do this programmatically. ...
4
votes
3answers
83 views

Trying to list datasources in mxds

I've written a tool that prompts the user for a directory path, and optionally a single mxd. It then crawls the directory for mxds (or just the single one) and writes some of the properties of the ...
2
votes
0answers
74 views

Improving performance of Laspy? [closed]

I have a working code for a project, but right now to run through the data it would take years to be completed. Please help me to improve it: import laspy import laspy.file import numpy as np ...
0
votes
1answer
245 views

Export or download feature layer table data from arcgis online using python or Arcpy

How would I export feature edit layers or their table data from arcgis online using Python or Arcpy? I want to download the attributes of a feature edit layer.
1
vote
1answer
26 views

arcpy.mapping exportPDF with ONLY one buffer ring turned on for associated iterated feature

I am exporting X number of maps iterating through a point feature class. Each feature class has a buffer drawn around them. I know how to export a PDF for each feature class at a fixed scale (if I ...
0
votes
1answer
39 views

reference to workspace not set

I have an arcpy-script which I want to execute outside ArcGIS which sould open an SDE-workspace. Therefor I create a new SDE-file by using arcpy.CreateArcSDEConnectionFile_management. When I use that ...
0
votes
1answer
201 views

Can Arcpy module be imported in python IDLE without ArcGIS desktop installed in my machine?

Can I run Arcpy module on a standalone application without ArcGIS desktop installed in my machine? How can I import the module without installing ArcGIS installed in my PC.
2
votes
1answer
57 views

Is there a non SDE version for the DisconnectUser (arcpy) function?

My work environment consists of multiple file geodatabases, on a number of shared network drives that can be accessed by multiple users at a given time. When I try to push out updates to feature ...
2
votes
0answers
50 views

Intersect does not fully process [closed]

Goal: Use python script to find overlap between various shapefiles in folders Inputs: folder 1 with multiple shapefiles and folder two with multiple shapefiles Method: #First intersection ...
1
vote
1answer
65 views

Feature class to feature class code

I have some code that will take a ArcGIS 10.2.2 feature class and post a copy of it in a different geodatabase. My code is set up so the end user can pick the feature class they want the model to ...
2
votes
1answer
106 views

Spatial Join Field Mapping in ArcPy?

I know there already are posts about this subject, I tried to derive a solution for my own problem but the code for field mapping is very complex to me. I have a Raster 100x100m and point layers that ...
1
vote
1answer
70 views

Cannot access row[1] using arcpy.da.SearchCursor [closed]

My code creates a dissolved feature class with 2 rows. For some reason I am unable to access the 2nd row using the following code: fcCount = arcpy.GetCount_management(fc) print(fc) #2 def ...
0
votes
1answer
76 views

Truncate/Append code

I've tried to write some python code to update ArcMap Feature Classess. I want the script to truncate the old data and populate it with the new data. My code bombs out though...I get the following ...
0
votes
0answers
96 views

Python Script Geoprocessing Service ERROR 000732: Input Features: Dataset

I am able to run my script and publish it to the server, but when i run it from the server I am getting this error: Traceback (most recent call last): File ...
0
votes
1answer
65 views

SQL in Python using variable - Arcpy

I have a code in which I'd like a da.UpdateCursor, I have probles with the "where clause", here I am about to use a variable that I get from arcpy.Describe. I have no idea of this even possible. My ...
0
votes
1answer
170 views

Writing expression syntax for Calculate Field in ArcPy?

I'm stuck on my CalculateField function with how to correctly type the syntax. I'm not particularly tied to the variables I assigned up front. The issue is syntax for the expression. I am ...
1
vote
2answers
109 views

Understanding use of extents in ArcPy?

I'm not understanding fully how extent is supposed to work in arcpy/python. I cant seem to get it to work in a function so i can filter it through my FCs. I have read the ESRI help files, but remain ...
1
vote
2answers
71 views

how to count character in arcpy script

can somebody tell me how can i count character in a field either using field calculator or cursor. i tried the below code : import arcpy inputFeatureClass = arcpy.GetParameterAsText(0) InputField = ...
1
vote
1answer
63 views

How do I save the sublayers of a route layer to disk

I want to calculate a route consisting of 4 points with a script tool and save the results to disk. I need the route to appear as layer on ArcCatalog for continuing working with it (modification of ...
1
vote
2answers
103 views

Trying to copy features from an in_memory table to feature table

i just want to write the in_memory table to a table in a .gdb import arcpy from arcpy import env import os import sys scriptPath = sys.path[0] thisFolder = ...
1
vote
1answer
208 views

Create polygons from points representing the corner vertices (ArcGIS)?

I am on ArcGIS 10.3.1. I have a point feature class that represents the corner vertices of the polygons. They are located in a regular grid. The labels represent the OBJECTID. The points can be ...
0
votes
2answers
258 views

Batch Zonal Statistics as table?

I want to calculate zonal statistics as table for multiple rasters, but can't figure out how. What I am trying is: import arcpy, os arcpy.env.workspace=r'F:\Sheyenne\Atmospherically Corrected ...
3
votes
1answer
165 views

Problems with nested loops - How to start from 0?

I have : 12 lines feature classes (lineFC) A polygon feature class (grid) Another polygon feature class with much bigger polygons (gridDivision) The process: Select one lines FC from a list ...
0
votes
2answers
145 views

ArcGIS calculate difference between rows in the same field that is date time format

I'm looking for help tweaking the python code discussed here: Attribute Table Subtract Value From Previous Value I'm having trouble figuring out how to adjust it for a date field in which I want to ...
3
votes
1answer
46 views

Script for updating certain shapefile records meeting different conditions

This is my scenario: List of names in a python list: a[] A 1000 records shapefile with a column: 'name' (populated) A second column called 'value' ArcGIS environment (arcpy) I want to update the ...
1
vote
1answer
77 views

Change numeric field values into negative

I would like to change one field values into negative (i.e. original column, row 1 = 5, new column row 1 = -5 in a feature class list. I got until the addfield and calculate field functions, but it ...
0
votes
2answers
125 views

Debugging ERROR 000664 when changing field name with arcpy.AlterField_management()?

I am trying to change a field name in featureclasses (shapefiles) using AlterField_management, however I receive the following error message: Runtime error Traceback (most recent call last): ...
0
votes
2answers
59 views

Getting around WFS Feature Count

Im trying to access a WFS where the feature count is limited at each extent (ie layer with 1000 feature with a limit of 100 for extent). Whether or not its to maintain performance or purely just being ...
0
votes
0answers
12 views

Calculating Grid square page names using loops, counters/cursors [duplicate]

I've created a large grid of 1 sq-mile cells to use for QC projects at my job. I've given each row a letter ID, and each column a number ID. So the grid starts with A01, goes to A02, etc. Next row ...
0
votes
1answer
93 views

arcpy.UpdateCursor setting value to 0 instead of Null

I'm having issues setting a row value to 0 when joining a csv to a shapefile. When the shapefile value is not in the csv, the row is getting set to 0 instead of null. This is a huge problem as i'm ...
3
votes
2answers
91 views

How to get all (or selected) values from a single field in a table?

I'm looking for a way to get all of the values from a single field in an ArcGIS table. Reasons for doing this might include pasting the values into a text document or SQL where clause. Since ArcGIS ...
0
votes
1answer
54 views

Executing published geoprocessing service for customized GP tool from Python scripting?

I have published the geoprocessing services for a GP tool. How can I use this link in python scripting to execute the GP tool? ...
1
vote
0answers
87 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 ...
0
votes
1answer
55 views

ArcPy empty shape?

I have a small script to search through a featureclass and copy and entire row to another featureclass. Its working well, in that I get all of the attributes for the row, but there is no geometry for ...
1
vote
0answers
73 views

Tabulate Areas is losing rows [closed]

I've got a feature layer of certain fields (which I converted to raster), and a raster layer of different vegetation types. I now want to compute the area of each vegetation type for each field. For ...
2
votes
1answer
52 views

Generating SQL expression from multivalue pick list in ArcGIS tool

I have created a script tool that allows users to select a single value from a pick list, which gets inserted into a query expression. The pertinent part of my code is pretty simple: Input = ...
0
votes
1answer
45 views

Boolean GetParameterAsText in a loop

I have this tool where the user inputs an ID number and the tool selects a list of features applies symbology (.lyr) and adds the queried features to the open mxd. # Import modules import arcpy ...
2
votes
2answers
110 views

Use Cursor to Calculate Field with Input Parameters

I have the following script that is used with a script tool to truncate each word in an input string and output the result to another field. There is an input parameter for the length of the ...