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

learn more… | top users | synonyms (7)

1
vote
1answer
62 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
75 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
173 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
64 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
77 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
51 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
68 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
66 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
149 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
35 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
101 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
44 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
42 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
69 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
61 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
57 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
59 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
53 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
119 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
69 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
1answer
35 views

lasmerge with more than nine input files

Is there a possibility to feed more than 9 LAS files to lasmerge? The user interface only allows 9 LAS files, but at liblas.org it’s described as there can also be a text file holding the file names ...
1
vote
2answers
63 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
46 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
74 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
147 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
133 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
120 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
110 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
44 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
72 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
50 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
43 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
11 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
60 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
81 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
49 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
68 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
47 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
62 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
45 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
38 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
83 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 ...
0
votes
1answer
86 views

Error 999999 when converting a point feature class to a raster in python

After having converted my xyz-file to a point feature class, I am trying to convert to a grid using a Python snippet. The data represents river bathymetry. However, when executing the script, I get: ...
0
votes
1answer
70 views

Importing updated CSV values to feature class fields?

Some time back I had a requirement to develop an automated method (Python) to update field values for a spatial points dataset in an Oracle 11g SDE database (exported to GDB for testing). Im Using Win ...
1
vote
1answer
138 views

Passing two variables into codeblock of Calculate Field tool of ArcGIS Desktop?

I have a script tool that truncates each word in field to 3 characters and outputs the result in a new field: "THIS IS AN EXAMPLE STRING" becomes "THI IS AN EXA STR" import arcpy ...
1
vote
1answer
35 views

Arcpy: copied python snippet does not work?

I am trying to convert XYZ-data to a point feature class. I've done this successfully in ArcMap, however, when I copy the python snippet, I get a RuntimeError. I did make some minor changes to make ...
0
votes
0answers
44 views

ArcGIS/ Arcpy: UpdateCursor with only one feature

System: ArcGIS 10.3 with Python 2.7.8 on Windows7 x86 Background: Build a Python script do get drive times from the Google Maps DistanceMatrix and copy the results to an attribute table. The script ...
2
votes
1answer
136 views

How to use multiprocessing or pool to boost up the performance of ArcPy script

I created some arcpy script which actually runs slow on huge dataset. such as 100000 feature in it. I read from below path that multiprocessing can boost up arcpy script script performance. ...