3
votes
4answers
134 views

How to convert all values in all fields of table to upper case using ArcPy & Python?

Does anyone know how to use the .upper() in a stand alone python script so it can be used to change all characters in a table into UPPER case? I don't want to use the field calculator since I have ...
2
votes
1answer
43 views

Can we access the ArcMap Image Analysis tools using Python?

Esri recently added a new Image Analysis window to ArcMap - it's found under > Windows in the main toolbar: The Image Analysis window's Processing section simplifies the experience of applying ...
1
vote
2answers
51 views

Counting Characters using Field Calculator - Arcmap

I am trying to use field calculator to populate a column based on the the number of characters in another column. I am using the Python Parser. I am not sure if the .count() function is appropriate in ...
1
vote
2answers
107 views

Import CSV column into existing feature using arcpy

My goal is to take a CSV that contains 50 rows and one column and import the data into a feature class with over 3,000 rows using arcpy. I want to pick a random row from the CSV and then iterate ...
0
votes
1answer
45 views

A formula error in raster calculator with arcgis 10.1

help me to solve a problem at a formula to calculate the susceptibility to landslide that gives me errors when computing with "raster calculator" in arcgis 10.1, the formula is exact but errors in the ...
2
votes
1answer
58 views

How to Export multiple selected features to PDFs with Python?

I have 77 polygons that mark areas of a satellite image that I want to export as separate PDFs. Each of the PDFs should contain just the polygon (and as much as the surroundings to fill out the data ...
0
votes
1answer
76 views

How to add several layers to the table of contents in ArcMap using Python in one shot?

I am already able to add individual layers to ArcMap table of contents using the following codes: # Adding the layer to the table of contents mxd = arcpy.mapping.MapDocument("current") df = ...
0
votes
0answers
41 views

How to bulk change the schema name of layer properties in ArcMap

I would like to change the data source location (schema) in layer property in ArcMap. Our data are stocked in an Oracle Spatial database. Recently, the DBA has changed the schema name and then I ...
1
vote
1answer
64 views

Delete Turned Off (Unchecked) Layers from Arcmap with Python

I have about 100 figures that have been updated countless times and a lot of the old data was left in each .mxd but was only turned off (unchecked) and not removed. I would like to remove these ...
0
votes
1answer
28 views

How to zoom to selection in arcpy.mapping and only see selected features?

I selected data by using select layer by attribute, then I need to only select these selection and zoom in to the selection. my code is this, it can zoom in base on the scale I set, but I see other ...
7
votes
3answers
400 views

How to extract the number of vertices in each polygon?

I have ArcGIS Desktop 10.2 and my challenge is how to extract the of number vertices in each polygon for all features like this: I have many parcels in my feature class and I want to extract ...
1
vote
0answers
45 views

how to open a layer's table in a map document

Trying to create a map document programmatically. Added a featureclass as a layer. When I open the map document in ArcMap, I want the table for that layer to be open. Found TableView (doc) and ...
3
votes
1answer
96 views

Setting the Centroid of a Set of Polygons

I'm trying to shift a set of rectangle polygons over an area of interest (AOI). I thought it would be as easy as setting the SHAPE@TRUECENTROID of the polygon area of interest to the ...
2
votes
1answer
64 views

Labeling only the latest feature

I need to label only the latest feature in a particular feature class. I actually would like to automate it, so that when I will add any new feature to this feature class, the label will automatically ...
1
vote
2answers
58 views

How to transfer multi attributes in to features?

i have 2 feature classes, i want to transfer all attributes by one click to another attribute feature class, i have used Spatial Adjustment tools, but the challenge with me is to, how to transfer all ...
2
votes
1answer
144 views

How to make autoIncrement number start with (001…009, 011…099)?

i have a challenge with my time in my work, i have feature class called "Parcel" storing many data, i generated an autoIncrement number by using field calculator, in field "parcel code" Expression: ...
0
votes
1answer
86 views

Clustering polygons by sum of values

I would like to group polygons that (1) are contiguous and (2) when the combined values of field X >= Y. Specifically I am grouping zipcodes that are connected. a group is when 1 or more zipcodes ...
2
votes
2answers
131 views

How to create simple select script in ArcPy?

I am new to Python and want to create a script inside the ArcMap Python window. My current workspace is a series of rivers portrayed in the state of Ohio. I have a list of fish and the rivers (from my ...
2
votes
1answer
166 views

Problem with running Python scripts in ArcMap [closed]

I'm having a problem to get my python scripts running in ArcMap. I keep getting this message no matter what script i use. Executing: Script1 Start Time: Thu Dec 05 15:37:50 2013 Running script ...
0
votes
1answer
63 views

Population Density in Plano Census Tracts

I am quite new to Python and I am attempting to practice by making a simple program with ArcGIS. I wanted to make a script that automated the calculation of population density of selected census ...
1
vote
1answer
88 views

selection by attributes with python

I have a problem concerning the selection by attribute with python on arcmap. I use this code: import arcpy from arcpy import env arcpy.env.workspace= "E:\cities" Mi=(r"E:\cities\rivers.shp") rows = ...
1
vote
2answers
119 views

How to add shapefile as layer to map using Python and ArcPy?

I am working on an application and I am a beginner in Python :( I want to add a shapefile, the execution is successful and everything but no result appears on ArcMap, here is the code I use: import ...
2
votes
1answer
230 views

arcpy - Calculate field in a joined table

I've to calculate a field based on another field in a joined table, but an error occurs: "Parameters are not valid. ERROR 000728: Field !Table_A.field_A! does not exist within table" My code: ...
1
vote
1answer
106 views

Help with field calculator in Python script

I am getting a syntax error in my script but I know from testing it in ArcMap attribute table, the syntax is fine. Anyone have any idea why this code doesn't work? I see that a search cursor has been ...
1
vote
1answer
71 views

How to analyze and combine overlaping elevation maps into one?

I have 30 overlapping maps that contain tree density heights (measures between 1-100%) of a large area, and I need to get the highest point by pixel and create a new map with all these highest points ...
1
vote
1answer
205 views

ArcGIS 10.1 crashes on use of python window

When I open the python window in either ArcMap or ArcCatalog (ArcGIS 10.1) as soon as I press a key it freezes the entire program and it crashes. It doesn't produce any warning, error, or pop up with ...
2
votes
1answer
145 views

How to refresh Catalog window from ArcMap using Python?

I am running my script from ArcMap and I have the Catalog window open on the side. I delete some extra files in the end of my script but I have to refresh the Catalog window to see them go. So I ...
2
votes
1answer
340 views

How to use GROUP BY with arcpy.da.SearchCursor in file geodatabase?

fc = "C:\Users\AuxS3-4\Documents\ArcGIS/Default.gdb\Malla" fields = ('OBJECTID','Sentido','Carriles','idMalla') sqlclause=(None, "GROUP BY Sentido") cursor = arcpy.da.SearchCursor(fc, ...
1
vote
1answer
172 views

remove whitespace Python code results in odd character - Field Calculator

I need to remove whitespace from the end of a string in a field in ArcMap. I tried first the VBA function RTrim, but whitespace still remained. I thought maybe the whitespaces were tabs, so I tried ...
1
vote
1answer
76 views

How to add ArcPy Feature Layer to ArcMap automatically?

With Python, how do I get either the MakeXYEventLayer_management or the MakeFeatureLayer_management layer that is temporarily created added to ArcMap automatically after the tool is ran, without using ...
1
vote
1answer
81 views

Dan Patterson's bounding containers

I used a toolbox by Dan Patterson () and the problem is that the new shapefile does not contain any field from my original shapefile and this is a problem because I can't join the two layers based on ...
0
votes
1answer
60 views

Looping on the Select_analysis tool

Im trying to perform a loop on the Select_Analysis tool in Arcgis. Code looks like this: inputfile = open("locality.txt", 'r') # locality.txt is a txt file of locality names loc_list = [] for line in ...
0
votes
2answers
145 views

Python Delete point in a distance of x meters

I took this code from this source Select maximum number of points more than x meters apart It seems to work for other users, but for me it's an endless loop. I do not understand why, though the code ...
0
votes
1answer
122 views

Whats the name of vertices order property?

I'm trying to find the next vertices on polyline using python script in order to calculate the angle between them. Whats the name of vertices order property ? Vertices have an attribute for X,Y and ...
1
vote
1answer
112 views

Compare field values and assign a new field to store value ArcMap 10 python

I am currently doing an analysis in Arc Map 10 using python, as I am not familiar with this tool, hence I come here to ask your help. I actually have two shape layers, one is a point layer and the ...
2
votes
1answer
307 views

Tool to convert Mike Urban network (shapefiles) to EPAnet network

This might be a too localized question, but I hope I'm not the only one here doing pipe network analyses in Mike Urban. I have a model in Mike Urban, and the client wants it in EPAnet format (since ...
1
vote
5answers
422 views

String variable substitution in selection expression

I'm trying to put a variable into a string used to do a selection. At the moment it's like this... expression = "'No_Props' > 5 AND %s < 200 AND 'ST_Ori' >60" % metres_field ...
2
votes
1answer
566 views

How to add feature class to MXD with ArcPy (Python)?

I am using ArcGIS 10.1 and I am trying to add a feature class that I create to an MXD, so that I can join to it. This all needs to be done using Python. Is this possible?
2
votes
2answers
1k views

How to convert field values from lower case to upper case in ArcGIS 10.1?

Using the Field Calculator in ArcGIS 10.1, I am able convert the first letter in a value from lower case to upper case. How do you convert the entire value to upper case, though? I can't seem to ...
5
votes
4answers
712 views

How to check via Arcpy if ArcMap is currently in an edit session or not?

I've created a Python add-in button that helps speed up my coworkers workflow by copying one feature class attribute to another. It uses the arcpy.UpdateCursor function to update a row in the target ...
5
votes
2answers
751 views

How to do advanced Python labeling in Arcmap?

Does anyone have a good reference for advanced/complicated labeling expressions in Arcmap? I am attempting to write a Python label expression that would involve multiple label definitions. Here is ...
1
vote
2answers
514 views

ArcMap label expressions with Python

Having trouble here: I'm trying to use python to write selective label expressions. I have several concentrations and depending on its "_Ex" number I either want it labeled red, not red, or not ...
2
votes
1answer
251 views

Search cursor stops selecting after two iterations

I have a script which selects an extent from a grid and exports the data frame. import os, arcpy mxd = arcpy.mapping.MapDocument('CURRENT') df = arcpy.mapping.ListDataFrames(mxd,"Layers")[0] ...
6
votes
3answers
806 views

How to efficiently read and reclassify many rasters in R

I've been tasked to create a suitability analysis of wave conditions in the Gulf of Mexico. I have 2 thousand or so raster files that are about 8 MB each (2438 columns, 1749 rows, 1km cell size). ...
0
votes
1answer
155 views

Rendering a layer in ArcMAP using ArcObjects and Pyhon

I succesfully wrote a script to render a Uniquevaluerenderer in a layer in ArcMAP using symbols from 4 parameters (values) read from the attribute table of the layer. I used ArcObjects and VBA, but ...
1
vote
1answer
46 views

How to keep specified separation distance between features in printout from ArcMap?

Does anyone have a solution to select features using attribute values and print only the selection keeping a specified separation distance between the features in the printout in ArcMap.
1
vote
0answers
58 views

Clipping Buffers

I have buffered a line shapefile where many lines are intersecting but not broken at intersections. I am trying to select each record in the buffer file and clip all intersecting polygons in the same ...
6
votes
1answer
2k views

Calculate area within Python script in Arcmap

I am trying to calculate the area of a polygon within my Python script. I create a new polygon from merging two together, and I'd like to add the area of the resulting polygon to a field in the output ...
1
vote
0answers
84 views

Creating Raster with values based on function output

I have a function that calculates a price based on the input slope and distance. I want to write the price to a raster as the rastervalue. How do I do that? OpenSource and ArcMap solutions would work. ...
2
votes
0answers
125 views

Python script to create a point on a line with attribute data

I have a line feature class with 2 lines (Engineering and Continuous Station series) co-incident on each other. I have created a toolbar(ArcGIS Desktop add-in 10.1) with 3 tools on it, add control ...