0
votes
0answers
25 views

How i can convert array to Feature layer using python

I have array and i need to convert it to Feature layer, i have converted the array to numpy array, so i can use (NumPyArrayToFeatureClass), ...
0
votes
3answers
31 views

FeatureClassToFeatureClass_conversion in ArcGis 10.1

I have many > 60 .dwg files I want to convert just the polyline parts of these and have put together a list of python commands using excel to get something like this: However when I try running ...
1
vote
1answer
30 views

How can I do a definition query on a layer and zoom to it?

I am trying to do definition query to a layer and to zoom to the same layer, but I got an error ("SyntaxError: can't assign to operator") ?? dataFrame = arcpy.mapping.ListDataFrames(mxd)[0] # the ...
1
vote
1answer
38 views

How to get a Layer as ILayer (ArcObjects)

I had asked this question previously which I think will work. But as I am new to this, I can't figure out how to get a Layer as an ILayer object to pass to the method that's in my previous questions ...
2
votes
1answer
54 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 ...
1
vote
3answers
78 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 ...
2
votes
1answer
96 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 ...
3
votes
1answer
65 views

How to develop a Toolbox intended to be distributed in multiple version of ArcGIS?

I am currently developing a Toolbox for users who will use it in different versions of ArcGIS (10+ versions). Is there a recommended way to proceed in that situation? My main concerns about that are: ...
1
vote
1answer
217 views

How to Properly Loop Through a List With a Cursor?

My team is working on a python script that does various updating tasks to our streets file. A part we are getting stuck on is trying to update a field. Currently we have a field FEDROUTE that is ...
0
votes
1answer
104 views

Python Field Calculator ArcGIS 10.1 expression question

I have gotten stuck on another seemingly simple arcgis field calculator python expression. I obtained a great answer to a another similar question a few years ago: Python Field Calculator ArcGIS 10 ...
3
votes
1answer
56 views

Python MemoryError when running ArcGIS Python Toolbox tool

I have a Python Toolbox (.pyt) containing a single tool. Part of that tool is the following function, which creates a dictionary from an attribute table, where the keys are the rows' OBJECTIDs and the ...
0
votes
0answers
43 views

gdal commands cannot import gdal — possibly ArcGis conflict with separate Python?

I installed ArcGIS 10.1 yesterday (Windows 7 64-bit), but have a separate Python 2.7 installation. Now my gdal does not work correctly anymore. It looks like all commands without the ending "*.py" ...
5
votes
1answer
63 views

Automate loading a table into SDE

How can I automatically load a table stored on a network share into SDE when the original table is edited? Environment is ESRI 10.1 ArcSDE on SQL Server. Preference for python or existing GP tools. ...
0
votes
2answers
55 views

Naming your Output feature class?

I am working in a work space in python on ArcGIS 10.1 on a remote desktop. Here is my code import arcpy from arcpy import env env.workspace = "E:\Example" PST = arcpy.ListFeatureClasses ("", ...
1
vote
1answer
128 views

Secure credentials for scheduled python script targeting ArcSDE 10.1 on AWS

I have a python script that will be used as a scheduled task. Our dba team is wanting the credentials to be as secure as possible. I would say that using the os security system as far as locking ...
2
votes
1answer
53 views

How to use the List field function for a toolbox script?

i´m trying to write a simple script for a toolbox, similar to the Addfield_datamanagement toolbox. The script adds a new field to a table of a feature class or a shapefile with attribute tables. So ...
-1
votes
2answers
64 views

How to use raw_input() with while-loop? [closed]

my task is to execute multiple buffers with the list-loop! import arcpy arcpy.env.overwriteOutput = 1 arcpy.env.workspace="C:\\salzburg.gdb" sbgRivers="sbg_rivers" buff_name=raw_input("Please ...
1
vote
1answer
57 views

Excel/Google Docs > Plss Map [closed]

Is there a way to map out PLSS (Public Land Survey System) TWP (township),RNG (range) and Section based off a field in google docs? I was thinking if you had your first column with the PLSS area in ...
4
votes
3answers
334 views

Bulk convert DBF to CSV in a folder ArcGIS 10.1 using Python

I would like to convert 1000 dbf files to CSV. All dbf files are in one folder and they have sequential names (S:\output_tables\tcb1.dbf, S:\output_tables\tcb2.dbf, S:\output_tables\tcb3.dbf, up to ...
4
votes
4answers
252 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
2answers
66 views

Adding layer into ArcMap via Python - .pyt versus .py

In the final step of a script I've built, I'm trying to add a layer into an empty blank map document. This is my block of python code below that adds the layer. Everything works fine if its run from ...
0
votes
2answers
70 views

How to add data to a newly created folder using arcpy?

I'm writing a script to create a new folder and then copy a feature class to a shapefile and add the shapefile in the new folder. The folder gets created but the script is failing on the feature class ...
0
votes
1answer
93 views

How to obtain the maximum/minimum longitude and latitude for a polygon?

I have the MSA/CMSA shape file which contains 274 metropolitan areas. How do I have to obtain the maximum/minimum longitude and latitude for an area? So, it's like drawing a box right outside and ...
0
votes
1answer
42 views

CalculateField_management - updating fields with X and Y coordinates for start and end of line

I've searched all the help documents and can't see where my script is going wrong. I've tried adding the fields as FLOAT, replacing "PYTHON_9_3" with just "PYTHON" but it just doesn't work. The ...
1
vote
1answer
34 views

Can i use CreateMapSDDraft in the arcpy.mapping library to set the scale range on tiled services at 10.1?

I know that esri has exposed many properties to the acrpy lib for publishing services. I need to published a tiled/cached map service but i need to set the min/max scale when i do that. Can this be ...
2
votes
2answers
76 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
43 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. ...
2
votes
1answer
62 views

Conditional SQL Query

I've been running a code that searches a desired field in a feature class and performs an specified SQL query based on whether the field is string or double. The variables are just temporary fillers ...
2
votes
3answers
406 views

Adding a new field and calculating area using Python

Using Python, how do you add a new field to your shape file and calculate the area in km2?
-1
votes
1answer
76 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
2answers
709 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 ...
0
votes
1answer
47 views

How to schedule a model to run at a certain time?

I'm trying to schedule a model to run at a certain time and have found this ESRI Blog post which is providing a good start. What I can't figure out though is where in the importToolbox function I tell ...
0
votes
1answer
59 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
128 views

Polygon Neighbors Analysis script (ArcPy 10.1) 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 ...
0
votes
0answers
66 views

Algorithm to find coordinates at selected intervals along a polyline?

I am developing an algorithm to search down a river at selected intervals and return the coordinates. See below: def Downstream(start, interval, data, offset=0, out=None): if out is None: ...
2
votes
1answer
72 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 ...
1
vote
2answers
97 views

ArcServer 10.1- Get Original Document location (mxd) from published web service using python

I need to extract the document location of a published web service. Is there any way this can be accomplished in python? I know where the maps are sitting on the server, and i know the name of the ...
0
votes
1answer
63 views

Best Way to Get a List of Selected Rows for a Specific Layer using Layer Object in ArcGIS

What is the fastest/cleanest way to get a collection of rows that are selected in a certain layer? For some background, I am trying to hide selected features in a specified layer. The solution ...
1
vote
0answers
174 views

How to use paths with non ASCII characters for subprocess calls with ArcGIS

I know that it is possible to create calls using unicode character encoding like \xf8 for non ASCII characters but how do I do it writing a path in a script just like: 'e:\gis\python_ø\notepad.exe' ...
0
votes
3answers
163 views

How to define an output parameter in Python script exported from ModelBuilder

I have a modelbuilder parent model with two nested models in it that ouputs a dwg file. I exported the parent model to a python script which is shown below. In modelbuilder, the output dwg file is a ...
2
votes
1answer
129 views

Hydrology tool dataset in ArcGIS 10.1 for calculating slope?

I am quite new to the hydrology toolset in ArcGIS and thought it may be useful for extracting slope data from a raster; I was wondering if anyone had experience trying to extract slope data upslope ...
3
votes
1answer
45 views

Understanding arcpy log files in the scratchWorkspace

When I run a tool through arcpy, a file simply called 'log' with no extension is created in the scratchWorkspace. This is quite different to the history log files which are XML and I cannot find any ...
1
vote
2answers
41 views

Is there a tool that allows the same functionality of extend/trim feature that was available in 9.3?

In ArcGIS 9.3 there was a tool called Extend/Trim Features that allowed you to select multiple segments and extend or trim them to a feature. In 10.1 that seems to have been moved to the Production ...
2
votes
1answer
222 views

Multiprocessing issues with ArcPy

I am using ArcGIS 'watershed' routine in a script which makes use of multiprocessing. This works fine, but during execution I get the message: Unable to remove directory. Possible causes: 1- Not ...
3
votes
1answer
62 views

Is there a tool to track edits that were made?

Is there a tool/report that keeps track of what edits were made that I could run prior to or after reconciling my versions? This would help me to know if there are any changes I need to make to any ...
5
votes
1answer
277 views

How to do a separate Python installation with ArcGIS?

I see a lot of threads asking how you can have a separate Python installation (e.g. the Anaconda or Python XY distribution) and get it to work with arcpy, while not 'breaking' ArcGIS at the same time. ...
0
votes
0answers
218 views

Creating multiple feature classes from multiple text files using python

I have a folder with multiple text files. I am writing a code that reads all of the text files, and creates a point feature class (i.e. a shape file) for each one. The text files are all tab ...
-2
votes
1answer
225 views

ArcGIS 10.1 Custom Toolbar issue with addin wizard

I am having some issues. In ArcGIS, I created a custom toolbar (with the python addin wizard) to do the following: 1. Button to connect to feature class, 2-5. A series of comboboxes to view, edit data ...
1
vote
1answer
123 views

Export map to geotiff?

I try to export my map (layout or data view doesn't really matter) to a georeferenced tiff-file (geotiff). However, this presumably easy task is proving rather difficult to accomplish. I first tried ...
0
votes
2answers
183 views

Can you change the processing extent in environment settings using python to a shapefile?

I have managed to do this manually at Geoprocessing>Environments>Processing Extent and setting the shapefile in the drop down bar. I was wonder if this could be automated with a python script? My ...