-1
votes
2answers
53 views

Use VB to calculate an area of a shape

I'm using Arcmap 10.1, running python 2.7 on a Windows 8.1 machine. I have a script that uses the arcpy.CalculateField_management function to calculate the area of a shape, however, for some reason ...
1
vote
0answers
30 views

How to replace data source of annotation feature classes using ArcPy?

I want to batch replace paths in a series of .mxd files using Python. Many of the layers have moved and in some cases the name has changed or its dataset is different. I've written this code which ...
0
votes
0answers
26 views

How do I set the xydomain extent and merge point feature classes in a geodatabase

I am trying to select point feature classes in a feature dataset and merge them while setting the XYDomain using Python. If I do the merge manually and change the environment settings to use a ...
1
vote
0answers
31 views

Alternatives for ArcGIS Data Reviewer? [on hold]

What are some QA/QC tools that act similar to the Data Reviewer to point out and save mistakes? I want to know all alternatives, but mostly would want to run them in 10.1 and or using arcpy. I want ...
1
vote
1answer
16 views

MakeQueryTable_management

When I run this code, it says "An invalid SQL statement was used". Any idea what does it mean? import arcpy from arcpy import env env.workspace ="C:/RG/Projects/CriticalDataNetwork/CDEC.gdb" try: ...
3
votes
2answers
119 views

Converting Vertices of Polylines and Polygons to Points and Maintain Attributes

I'm pretty sure someone has done this before, but I'm having no luck. I'm using ArcGIS Standard version 10.2.1 and I want to convert all the vertices of a polyline or polygon to points. Essentially, ...
-1
votes
1answer
66 views

Maximum length of path using arcpy? [on hold]

I'm using ArcGIS 10.1. When I try to run the script it gives me this error message. ExecuteError: Failed to execute. Parameters are not valid. ERROR 000732: Input Data: Dataset 'Q:\Field Data\6th ...
1
vote
0answers
35 views

Managing large number of catchments/watersheds

Does anyone know of an easy way to manage a large number (10,000's) of catchments/watersheds? I have defined a stream network and for each segment, I have a corresponding catchment (in a unique ...
0
votes
1answer
63 views

Error with Python Script tool for ArcGIS 10.2 [on hold]

I am trying to create an ArcGIS map tool that includes creating TINS and uses parameters. This tool works fine when taking the data from shapefiles, but when I use map layers, which is what I want it ...
3
votes
0answers
55 views

After ArcGIS 10.2.1 update, Arcpy 64 bit import Error

I've updated my ArcGIS desktop version from 10.2 to 10.2.1 and have noticed that when I run the 64 bit version of IDLE I now get an error when trying to import arcpy: Python 2.7.3 (default, Apr 10 ...
6
votes
1answer
160 views

Is it possible to interrupt Select Layer By Location when first feature selected?

I´ve got a point feature class with some 7.000.000 points and I´m trying to check if any of these points is simply intersected by several polygon feature classes using 'for' loop and ...
0
votes
0answers
26 views

How to compare features of two different geodatabases using ArcPy?

I would like to use the feature compare tool in arcpy two compare the contents of two different workspaces. I wrote this code for this purpose. Unfortunately I´m getting any output although there some ...
1
vote
0answers
28 views

Why does clip only return the top polygon?

I'm running the command below on a data set with many stacked polygons. This is a county standard so I can't change the way they manage their data. Each type of polygon can be uniquely identified ...
1
vote
2answers
46 views

Change field map properties in ArcMap

I am trying to import csv files in ArcGIS to do a join. However, some of the fields are identified as double, some as long and some as long. Therefore the join results in bunch of columns with NULL ...
3
votes
1answer
25 views

Why is Mosaic or Mosaic To New Image causing a 1-pixel gap between adjacent images?

I have a series of adjacent PNG images, and I'm trying to merge/mosaic them into a single seamless image. The images have clean "cuts" between them, with no overlaps. However, when I use either the ...
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 ...
0
votes
0answers
16 views

Min value (OD Cost Matrix)

I have an attribute table with columns that I have gained from running an OD Cost Matrix. In one column named "Total Minutes" I will select the lowest value (the shortest route). Then I will create a ...
1
vote
1answer
27 views

Transfer domain descriptions from coded values to string text at a new field

Further to my earlier question,I'm trying to develop a script that eventually should contain three parameters, feature layer, domain field and a new text field. How can i write a loop that will update ...
1
vote
2answers
37 views

How to get/set label scale ranges (e.g. minScale) in ArcPy?

For a layer object lyr, one can programmatically set the minScale in arcpy as such: lyr.minScale = 150000 For a label, one can manually set the scale range within a dialog in ArcMap. In arcpy, is ...
-1
votes
4answers
106 views

Issue with UpdateCursor and if/else statement

I have been working on this code for awhile and I can't make it work the way I need it to. The code is suppose to move a feature according to a set distance from types in a designated field. As the ...
0
votes
0answers
16 views

Error building pyramids/statistics on raster with arcpy

I am building a script to process rasters with the option of adding the extra step of building pyramids and statistics at the end. For some reason, it will not recognize inputs as legitimate raster ...
3
votes
1answer
41 views

How to obtain the width and height of an image using arcpy

This Stack Overflow question shows how to obtain the pixel dimensions of an image using Python. Is it possible to find an image's height and width using arcpy and ArcGIS? arcpy.Describe would seem ...
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
0answers
44 views

Intersecting Polygons

I have 10 shape files containing polygon features. I would like to produce a single polygon layer containing portions of the input polygons where no fewer than two of the aforementioned feature ...
3
votes
1answer
88 views

Arcpy Update Cursor (arcpy.da.UpdateCursor()) not saving changes to 'SHAPE@LENGTH'

Looked around and found other Cursor questions, but nothing dealing with updating 'SHAPE@LENGTH'. I am running ArcGIS 10.2.1 and have a multipoint shapefile that I am grouping into polygons based on a ...
2
votes
2answers
59 views

arcpy.Dissolve fails; need a arcpy dissolve to multipart workaround

I have a arcpy script in which I am using arcpy.Dissolve on a single feature class with multiple features to get a single multi-part feature in the output. The script is successful only part of the ...
2
votes
1answer
82 views

How to generate landmark-based route description using ArcPy?

I am now using ArcGIS 10.1 and currently a beginner in ArcPy. There is a project requiring to generate landmark-based route description. I am wondering how to use a buffer to find the landmarks in ...
2
votes
2answers
36 views

Why is arcpy.StackProfile_3d -> arcpy.SaveGraph_management creating empty graph?

In a python script I'm trying to save a graph to a .png file with graph output from arcpy.StackProfile_3d but the .png file shows an empty graph. The table created from arcpy.StackProfile_3d shows ...
0
votes
1answer
23 views

replace data source for all layers that point to shapefile

Hi I'm trying to do something quite simple but its not working. I want my python script to change all of the layers that point to the same datasource (a point shapefile) to another point shapefile. ...
5
votes
2answers
88 views

Is there a way to refresh imported modules in a ArcGIS Python Toolbox?

When using a python toolbox (.pyt) in ArcMap, I'll typically follow a pattern where the .pyt file itself is simply a wrapper to collect input arguments and define the tools themselves. Supporting ...
0
votes
0answers
39 views

How to extract raster using corresponding polygon using ArcPy?

I have to perform a simple raster extraction, but I can't find the way to do it. In a polygon layer, I have watersheds with their ID's. And in a folder, I have rasters, each one corresponding to a ...
1
vote
1answer
59 views

empty file geodatabase error (nowhere feature class)using arcpy [closed]

i want to import a python(2.7) script to arcmap 10.1 my script has 2 inputs variables one for workspace and another raster dataset and i want o convert input raster as feature class polygon . i want ...
-1
votes
1answer
42 views

define error for python script to import arcmap [closed]

i want to create a simple python script for create one file geodatabase but show me define error # Import arcpy module Import arcpy import sys import os from arcpy import env from arcpy.sa ...
1
vote
0answers
60 views

Running python script outside of Arcmap's python console

My codes works fine in Arcmap's python windows. But when I try to run it in a command promt windows, It says that; ERROR 000837: The workspace is not the correct workspace type. But it works fine ...
1
vote
1answer
57 views

SQL within Python Script to get only part of the expression by GetParameterAsText

I was wondering if anybody could help me. Im trying to create a tool within ArcMap using a python script. Within the script i've been trying figure out how to change it so that I only need to get ...
0
votes
1answer
68 views

Unique Values in validation

How do I ensure the same selection is not made on param[2] and param[3] both of which are populated from the same field using tool validation? import arcpy class ToolValidator(object): """Class ...
0
votes
0answers
19 views

problem saving GRID to .img keeping original names (export by attributes)

I am really new in Python programming. I try to make a loop for Extract by Attributes tool in ArcGIS 10.1. I have a huge dataset of raster (760pc) and I want to extract a specific value. This part of ...
2
votes
1answer
51 views

How can I exclude a field on a table from being copied?

I have a query "layer": >>> r = arcpy.MakeQueryLayer_management(r'C:\path\to\connection\file\connection.sde', 'TEST', 'SELECT T.ID AS OBJECTID, T.* FROM MY_TABLE T WHERE T.SOME_COLUMN = 1', ...
1
vote
1answer
81 views

How to create sequential field based on sorted data? (or extract pop-up data?)

I downloaded a kmz field and converted it to a GDB fc on arcmap. However, the field I need to label the layer by is stored in the pop-up html field... It looks like this: <html ...
0
votes
1answer
35 views

How to set parameter filters in ToolValidator?

I am populating parameter[2] using validation code provided by ESRI. How can I modify this code to repeat for parameter[3] what was done for parameter[2]? To elaborate...param[0] is a user supplied ...
0
votes
1answer
71 views

Why does arcpy.SelectLayerByLocation_management give ERROR 000368: Invalid input data?

When i trying to do Select by location i got : arcgis scripting. ExecuteError: Failed to execute. Parameters are not valid. ERROR 000368: Invalid input data. Failed to execute (SelectLayerByLocation) ...
-1
votes
2answers
244 views

How to avoid ImportError: No module named arcpy causing Failed to execute (Script) error?

I have a proplem with arc hydro in arcpy,i want to create a simple script where automated some tools from archydro in arcpy.. I use arcmap 10.1 and python 1.7,my import is one dem and my export is a 6 ...
1
vote
1answer
52 views

Convert decimal latitude/longitude bounding box to SRID 26910

I have a bounding box specified in decimal latitude/longitude, and need to convert this into a bounding box in the SRID 26910 coordinate system. I've never had to work with different GIS co-ordinate ...
4
votes
2answers
128 views

How to transfer attributes to thousands of local points from ArcSDE feature class with millions of polygons?

I have a set of points and a huge feature class with topographic information (OS MasterMap for who knows it). I'm talking millions of polygons huge. I want to transfer attributes of the polygons to ...
2
votes
1answer
51 views

Problem adding dates into an existing feature class from an excel spreadsheet [closed]

I've been trying to load data from an excel spreadsheet into existing feature classes, but I've been having some trouble with the dates. I've written a script that compares the values in the ...
0
votes
2answers
38 views

Arcpy GetRasterProperties returns odd results

I have this simple piece of python code to test whether a raster has integer values or not: res = arcpy.GetRasterProperties_management(ws, 'VALUETYPE') res = res.getOutput(0) ...
0
votes
1answer
44 views

How to identify a selected graphic element(s) in python

I have a situation where I am inserting items from Excel into maps a lot. When I insert the items it always makes them a fixed width and then adjusts height to maintain aspect ratio. What I would ...
0
votes
0answers
21 views

Points Missing on Import of LongLat data to SHP using ESRI script CreateFeaturesFromTextFile()

In ArcMap 10.0 I am using a 9.1-era ESRI script in Python called CreateFeaturesFromTextFile. There appears to be no ArcMap 10 update. The input text format is the strict format ESRI point,X,Y layout ...
0
votes
1answer
45 views

automatic save outputs variables in the folder workspace using pyhon for arc map 10.1

I want to create python script with aim to import him in environment arcmap 10.1 and to make a hydrologic analysis because the scipt meybe can have many outputs raster file or feature class would ...
0
votes
1answer
69 views

Using Python for Polygon Neighbors Analysis in ArcGIS 10.1: Script producing erroneous results

I'm struggling with a python script that is supposed to calculate a field for a polygon feature class. The calculation is of the average of a field value (P_TOT_DEV) for each of a given polygon's ...