0
votes
1answer
52 views

What is the syntax for Python 2.7 to permanent display in percent in a field column?

What is the syntax to build to calculate field, for example, Acres to Percent? 841173.00 to 82 % What I want the field column in Percent to be display numbers with percent with the alignment to ...
2
votes
1answer
31 views

Randomly choosing one from multiple fields in Field Calculator of ArcGIS for Desktop?

Using the Field Calculator in ArcGIS for Desktop, I want to randomly choose one field from a list of 10 fields (strings). The Excel equivalent, which is working, is: =INDEX(A2:J2;rnd()*10+1). How ...
6
votes
1answer
144 views

How to classify time periods in a new field, using Python?

I have a datetime field (Horario) in my feature class, showing only the time. Although the date doesn't appear, it seem to be stored automatically as 30 Dec 1899, I'm not sure why. I want to use ...
2
votes
0answers
33 views

How to check whether an optional FeatureSet parameter was set by the user in a geoprocessing script tool?

I have created a custom geoprocessing script tool which contains an optional FeatureSet parameter. When unpacking the parameters in the script, the FeatureSet is defined as a RecordSet object, even ...
0
votes
1answer
26 views

List index out of range error

I've been writing a script that clips large datasets based on a selected feature. It works fine when I run it in a test workspace where only related layers are active and running. However, when I run ...
0
votes
0answers
27 views

How to select duplicate polygons? [duplicate]

Although it may seem this has been answered before, there doesn't seem to be a solution. I am trying to simply select duplicate polygons. I don't want to delete them or anything like that. I need ...
2
votes
3answers
100 views

Iterating using search cursor and layer selection performance?

I'm trying to use the results of a search cursor to iteratively make selections on a feature class and then create new feature classes (so you get a new feature class or shp for each unique value in a ...
0
votes
1answer
35 views

Data driven page with Count

I was wondering if there is a way to add coding to Data Driven Pages with python. I would like to be able to take the "Data Driven Page with Count" and increment the count by one or in some cases ...
2
votes
2answers
47 views

Duplicating polygons in Layer using ArcPy cursors?

I am trying to Duplicate some polygons in the same layer with the same attributes, But it will duplicated them with Null Geometry, i have tried getValue() method, but i got error import arcpy ...
2
votes
1answer
71 views

How would I group values in a field based on range of number using python, and then update the attribute table?

An example of what I'm trying to accomplish is described below, however they don't describe how to use the data update cursor to update the attribute column. data - Group values based on range of ...
1
vote
2answers
72 views

How to merge dbf files(zonal statistics as a table) in GIS environment.?

I am not very savvy at using Python. Actually I have around 1000 output files from using the tool zonal statistics as table in ArcGIS. The names of the files are jan_60, feb_60......dec_13. These all ...
1
vote
5answers
94 views

Calculations in if statement

I want to perform a simple calculation with the Field Calculator using this piece of script (note that all the elif statements are attempts for another syntax and non of the worked): def ...
2
votes
3answers
71 views

How can I iterate Selection by Attributes?

I have a large data shapefile for the state of New York. Each shape has a code corresponding to each county, so I want to iterate "Selection by Attribute" for each code, create a layer from all the ...
0
votes
4answers
48 views

Populate a field from another field with a conditional

I am working in SDE geodatabase where I have a feature class 'Mange_Waste' and "Q1", "Q2" are two fields. I wanted to use python script for populating "Q2" from "Q1" with a condition. Like, if the ...
1
vote
2answers
51 views

Python query to find records with more than one alpha character in a field

Using ArcGIS Desktop 10.2. I have a field in a table of several thousand records. The field is made up of alphanumeric characters. I'd like to perform two queries using python on this field: ...
4
votes
1answer
90 views

How to cancel tool execution in python

I've written a python function that calls a tool (Import CAD to GDB) in a loop. When I run it I have seen that it hangs sometimes, and I have to force the script to quit. I am wondering if there is a ...
0
votes
1answer
51 views

Getting error 'exceptions.NameError' in Python script?

I'm getting <type 'exceptions.NameError'>: name 'B' is not defined when I run this script. Why is my 'B' not defined and is it a syntax error? For clarification, I am trying to get the code to ...
0
votes
1answer
35 views

Arcpy Subtracting rasters error - TypeError: 'unicode' object is not callable

I have a script which subtracts 2 versions of the same raster from each other (one newer than the other) and then extracts the additions & deletions that have happened. I created a simple test ...
-1
votes
3answers
38 views

ArcGIS arcpy code fails in Toolbox mode

This code executes correctly in Python window but fails with ERROR 000732: Input Table: Dataset JHJ does not exist or is not supported # Import ArcPy and other required modules import arcpy ...
3
votes
1answer
65 views

Dynamic title in ArcMap

How can I have a dynamic title of the map, which changes depending on the layer chosen? Is this doable? It would save a lot of time and iterations since I should be producing several maps. To ...
2
votes
1answer
24 views

Arcgis, Convert analyse result in numeric value

I have a problem that seems really simple but blocking me... in Arcgis i have script python where i want to extract the resolution of a raster and use this result like numeric value for use in a ...
4
votes
1answer
148 views

Why is matplotlib installed with ArcGIS?

Today I upgraded to ArcGIS Desktop 10.2.2 as well as the 64-bit background processing tool and noticed that both numpy and matplotlib were installed with Python. In fact, in the "What's New?" section ...
0
votes
1answer
21 views

ArcMap 10.2 Sum Acreage for matching areas in another field; ultimately use ModelBuilder?

First off, what I'm attempting to accomplish is to sum the acreage of matching "WUNAME" and populate the "WU_Acre" I've tried to highlight the fields as shown and use the field calculator SUM(Acreage) ...
1
vote
1answer
35 views

Python Toolbox (.pyt) Tool Output Layer Name

How can I manipulate the TOC display name of my output parameters when using a Python toolbox (.pyt) Tool class. I tried adding a symbology layer, however this has no affect on the TOC name. Is it ...
0
votes
1answer
39 views

Definition Query then Zoom to Layer Automation?

I'm trying to create something in here. I want to have an automated process of doing a DEFINITION QUERY then ZOOM TO LAYER with one step. the concept is like that, a dialog comes up with one form ...
0
votes
1answer
25 views

How To Turn Off Map Drawing When Using Python in ArcMap?

I have a Python script that creates layers in ArcMap. The script works fine, but when a new layer is created a map is always automatically drawn, which makes the script take longer to process. I ...
1
vote
0answers
22 views

Automating polygon mergers with python

This is the first real world python program am trying to write. I am trying to create a scrip that takes a shapefile that has n polygons with an integer formatted date (e.g. yyyymmdd or 6/24/2014 is ...
0
votes
2answers
34 views

If-Then-Else statement in ModelBuilder has improper syntax

I have a model that converts a road network into a different schema for a different program. In one step of the model I am converting values for a field "Class". I wrote an If-Then-Else statement in ...
-2
votes
0answers
30 views

Error 0100060 while running Extract by Points? [on hold]

The resources have not been much help here. I can run this same process hardcoded in the IDE, however through the tool dialogue it gives the following error? Any thoughts? ExecuteError: ERROR ...
2
votes
1answer
67 views

How to find missing dependencies in a distributed ArcGIS Python toolbox?

I am developing a Python Toolbox that uses a few external libraries (ogr/gdal, matplotlib, shapely, reportlab among others) which files I have directly copied in the same folder as my toolbox .py, as ...
0
votes
0answers
54 views

What is GDAL equivalent to ArcGIS Lookup (Spatial Analyst) tool?

I use the Lookup (Spatial Analyst) tool to create several raster layers from a combined raster layer. I know ArcPy can do the same thing. However, I would like to know whether GDAL (or another ...
2
votes
1answer
56 views

What are resources to learn ArcGIS for someone who already knew Python [closed]

I know that there are several resources recommendation questions, however, they are all from GIS people trying to learn Python (for example, here). My situation is the opposite: I have worked ...
1
vote
1answer
38 views

How to export a set of layers into multiple PDF(orAI)files, one layer at a time?

I am completely NEW to PYTHON(only took a 3-hr entry course in ESRI tutorial. I have a dataset contains files named as "1_A, 1_B, 1_C....12_A,12_B, 12_c,....200_A, 200_B, 200_C..etc." I need to export ...
1
vote
1answer
62 views

Arcpy: List to point feature class

I have a list of lists that contains: [vala, valb, valc, vald, (pntx, pnty)] [vala, valb, valc, vald, (pntx, pnty)] [vala, valb, valc, vald, (pntx, pnty)] I also have a list of the field names that ...
1
vote
2answers
80 views

Conditional Calculate Field Many to One

Anyone have experience calculating a field based on a many to one scenario? I have a feature class in a geodatabase with a field of unique names. Feature Class Table (let's call this ...
1
vote
2answers
41 views

Set parameter of field from number to string with python

since I realised python is a very useful tool in ArcMap I dont want to do any workarounds anymore. I have a field with is numeric, but I want to perform this calculation in the field calculator on it ...
5
votes
1answer
159 views

Is there a way to use ArcPy module in the python shell that is not with ArcGIS?

I have ArcGIS 10.2 installed on my machine. When ArcGIS was installed, python 2.7.3(32 bits) was also installed. I need python 2.7.5 64bits for some gdal functions. So I installed python 2.7.5 64bits ...
1
vote
3answers
80 views

Merging many to one data rows in arcpy [duplicate]

The dataset 'left_right_merge' at the bottom of my screen shot shows the dataset that I'm currently working with. The NODE values indicate a single point feature, but is duplicated with many ...
0
votes
2answers
67 views

Any clue how to read a .style (ArcGIS) file in Python, for converting into another platform-specific format? [duplicate]

The problem I am face with is that I have all my data as shapefiles but my organization works with only 1 ArcGIS license. Migrating to QGIS to prominent amount of work, I need to convert my ArcGIS ...
9
votes
3answers
134 views

Setting symbol descriptions of ArcMap layout legends from table?

ArcMap has the ability to show an extended description for each item in the symbol list. How can I populate that property from a table? The goal is to avoid having to edit each symbol one by one in ...
1
vote
1answer
83 views

Creating a Simple Join Script in Python

I'm trying to create a simple join script in python from an arcgis model, where the only steps are joining a map to a table to produce a map with the table's properties. The attributes joined ...
1
vote
2answers
85 views

Calculating distances between points two feature datasets

I will do my best to explain my problem. I have two feature datasets. One set has about 100 points that are "city centers." The other dataset has points for each census tract in each of these 100 ...
5
votes
2answers
149 views

Replacement for ArcScripts

Does an equivalent of ArcScripts exist? I know of the the ArcGIS resource center and "Code Galleries" but does something that equates to ArcScripts where users share useful ArcGIS code exist? The new ...
0
votes
2answers
48 views

Is there a way to use gdal functions from OSGeo4W out of their shell?

I would like to use some gdal functions from OSGeo4W (gdal2xyz, and gdal_merge) for my work. I can use them in the OsGeo4W shell provided after installing the package. But I want to use them in ...
-1
votes
1answer
168 views

Creating a python script to import an excel spreadsheet, create shapefile and do some analysis [closed]

I am trying to write a script that does the following. Imports an xls file containing x, y, and other columns with data. I want to make this into a point shape file. I want to take that point ...
0
votes
1answer
67 views

using Z and M feature geometry to create line graph in Python?

I am a Python (v2.6.5) noob trying to plot a series of 3D polylines into graphs. So far I've come up with: # Import system modules import arcpy, os, sys, string from arcpy import env ...
1
vote
1answer
58 views

Fix Black Border in Python Batch Raster Conversion

I have a Raster image like this as you can see the road are not connected between 2 raster (up and down) its because the scanned raster use different projection (dgn utm 50s) than my data frame (utm ...
1
vote
0answers
59 views

Writing values to feature class in Python script results in strange characters"? [closed]

The script below does a series of things, and towards the end it is supposed to write values pulled from a list to a new field, if the feature class name is found anywhere in a list element. It does ...
1
vote
2answers
96 views

Create Feature Class From XY Table Using Python

I have some txt files that are basically attribute tables (object ID, latitude, longitude, area). In ArcMaps, I have been converting these files into feature classes and saving them in a geodatabase ...
2
votes
1answer
98 views

Merge from arcpy.ListTables() producing duplicate rows?

I was trying to manually merge file geodatabase tables and was getting Null values for the output file rows and decided to write a python script to merge the files. Here's my script: import arcpy ...