Quantcast
Channel: Question and Answer » arcpy
Browsing all 767 articles
Browse latest View live

How apply error messages to a python toolbox that prevent my tool from...

This is a continuation of my question here: Point and Polyline I tried making this question easier to follow. My tool accepts two main parameters – a continuous centerline and a table (or a feature...

View Article


How to track changes in feature class so as to update only the specific...

I have a non versioned enterprise geodatabase. I need to know when a feature class changes, and which features have changed every time. I need this for updating only specific tiles in a cached map...

View Article


How do I compare two features to test if they are identical?

What is the most efficient method for determining if two features (points, lines, or polygons) are geometrically identical? I’m not concerned about a square figure that contains eight vertices (four...

View Article

Consolidating spatial data for nearly 200,000 acre area

more of a broad question here: I’m trying to take a huge amount of spatial data for a specific 200,000 acre area, collected over 15 years dating back to 2000, and organize it. The data layers relate to...

View Article

Configuring Python to avoid conflict with ArcGIS for Desktop (ArcPy)?

I am trying to find the best way to configure a new version of python in my computer (windows) so that I do not have any problem with the python version that I have with ArcGIS. Is there anyway to have...

View Article


Why is there a lock when using arcpy.DeleteField_management in arcgis 10.0?

This code only works when ArcCatalog is closed or the featureclass has never been opened by ArcCatalog. For other arcpy management functions this is not the case, but when ArcCatalog is open, I get the...

View Article

Image may be NSFW.
Clik here to view.

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 above....

View Article

Creating shp from txt files using ArcPy?

I have a txt file like this: Point 0 347172.2 4269952.7 60.9090909091 1 337172.8 4278952.4 85.7334909091 2 344572.3 4547952.2 123.909673091 3 347532.8 8777952.8 456.467809091 END The third column are...

View Article


Arcpy to append results of pivot table

Good Day All, So I have a script that does some processing but the main part are two things run a multiple ring buffer using arcpy.MultipleRingBuffer_analysis and four rings do some zonal statistics...

View Article


Image may be NSFW.
Clik here to view.

Skipping an iteration in modelbuilder

So I’ve been assigned to clean up someone else’s model. Here’s the situation. The model is supposed to iterate over a few hundred folders containing feature classes and convert the contents into...

View Article

Image may be NSFW.
Clik here to view.

Python Script to Select records based on user input

I am running Arc 10.3 in a versioned environment. I am attempting to write a simple code that will select service records coming from Oracle CRM to a separate feature class containing only records that...

View Article

Listing Data sources using arcpy: ListLayers very slow

What I am trying to do is create a list of all the data sources in a directory filled with mxds. So I have this code pasted below. For some reason when listing layers it can take up to 50 minutes even...

View Article

ArcGIS 10.2.1 arcpy handling quote mark styles

I have been asked a question that I believe is due to a mix a quote marks however I cannot specifically say why this is so in the example below. I wondered if anyone has had a similar issue. A small...

View Article


How do I change the color and trasnparency of a layer using arcpy?

I would like to create an arcpy script to change the color and transparency of a collection of layers. The color and transparency would be based on wildcards such as “_dog” or “_chicken”. The layer...

View Article

CSV to ArcGIS table, insufficient text field length

I currently use arcpy.TableToTable_conversion in order to convert a CSV file into an ArcGIS file geodatabase table. This works when string length is less than or equal to 255 characters. Whenever 255...

View Article


Why does arcpy's Alter Field return “The tool is not licensed”?

According to the help file, the ALTER FIELD command is available at any license level. ArcGIS for Desktop Basic: Yes Why am I getting a license error when trying to rename a field alias on a sample...

View Article

find all the null records for all fields in a shape file

I figured out that I can use field calculator on a single column in arcgis 10.3 attribute window as follows: def RemoveNULL(x): if x is None: return '' elif x == '': return '0' else: return x...

View Article


I have a large dataset of lakes, which I want to group into n clusters, based...

There’s a longer explanation of why I’m interested in this below, but in short, I’m wondering how to run something like a k nearest neighbors formula, with the number of groups determined by a maximum...

View Article

Automating update of network dataset in ArcGIS Server

I am trying to set up an automated process that does a nightly extract of the network dataset from SDE and publish to: ArcGIS Server 10.3 as a network service fGDB as network dataset It seems you can’t...

View Article

How to calculate field as a substring of another?

I have a text field, field1, that’s populated with 14-digit identifiers, like "01234567890123". I create a new field, field2, that I want to show the first four digits of field1. I would like to do...

View Article
Browsing all 767 articles
Browse latest View live