0
votes
1answer
37 views

How to create polygon feature class from UTM coordinates?

I am working to create a polygon from UTM coordinates. The script I am using fails with a "must be a sequence, not float" error: Traceback (most recent call last): File "F:/sample/clipTiles.py", ...
6
votes
5answers
154 views

How to access adjacent rows with cursor?

In the attached screenshot, the attributes contain two field of interest "a" and "b". I want to write a script to access the adjacent rows in order to make some calculations. To access a single row, ...
0
votes
0answers
80 views

UnicodeEncodeError when using arcpy.gp.TraceGeometricNetwork_management() [closed]

I am creating a python tool (run through ArcMap) which will eventually go through a feature class selected by a downstream trace and use the obtained values to do some function. I am trying to follow ...
13
votes
1answer
733 views

How can I utilize NumPy arrays to optimize big data geoprocessing?

I'm interested in learning how to utilize NumPy arrays to optimize geoprocessing. Much of my work involves "big data", where geoprocessing often takes days to accomplish certain tasks. Needless to ...
1
vote
1answer
177 views

Database Connections folder is empty when viewed with ArcGIS tool

I'm trying to create an ArcGIS tool which accepts an SDE connection file as an input. I made a new interface with an input parameter and set the type to Database Connections. When I open the tool and ...
5
votes
2answers
421 views

ArcMap Arcpy scripts: How to handle user password input?

I'm currently trying to write a script that has a username & password input which then returns some data if the user has appropriate access. The script works just fine when I hardcode my own ...
5
votes
2answers
202 views

Is there a way to increase the search radius of nearest neighbors for the Nibble tool?

I am working with a raster map vegetation types. I have about 20 types with unique raster code values that can be sorted into three classes: 1 - vegetation types I want to expand using the nibble ...
2
votes
1answer
425 views

How to access all mxd files in a folder?

I'm a beginner to Python and am trying to figure out how I can access several mxds in a folder. For example, when I want to use the AnalyzeforMSD function in ArcGIS: import arcpy mxd = ...
12
votes
3answers
615 views

Industry-based examples of using Python in geoprocessing and arcpy

I was asked recently by some students what types of operations GIS Analyst/Developer are usually trying to automate by using Python with geoprocessing in ArcGIS and ArcPy site package. I guess it ...
2
votes
1answer
205 views

Difficulty converting standalone script to ArcGIS tool

As my title says, I am currently trying to make my (working) standalone script into an ArcGIS tool so I'm not the only person in my office that can use it. It essentially selects all the data within ...
5
votes
2answers
563 views

Make Buffer like Offset in Arcpy

I would like to make a buffer for a polyline and get as Output a Polygon with the same angles as the polyline, having not arcs, like in ordinary buffers. i tried the FLAT option in arcpy, but it's ...
4
votes
2answers
414 views

ArcGIS Conflation Tool Recommendation or Custom Script for Comparing Points

Can anyone recommend conflation tools for ArcGIS Desktop (10 or 10.1, paid or free) or a scripting outline / procedure (or just a script) to have a technician efficiently process the following rules? ...
1
vote
2answers
446 views

How do results from a Python script get added to an ArcGIS map? [duplicate]

I have a Python script for ArcGIS that makes a new feature class. I can add this to ArcGIS as a new Script (without parameters), however the resulting feature class is not automatically added to the ...
2
votes
2answers
696 views

How do I construct a file path within Python for a Feature Class within a Feature Dataset?

Based on my understanding of the ArcGIS path structure, a feature class inside a feature dataset inside a geodatabase can be accessed by the following: C:\Menu\Lunch.gdb\Sandwich\Cheese Where ...
2
votes
3answers
1k views

How to use ArcGIS 10.1 to make Python scripts for ArcGIS 9.3?

Recently I have been making scripts to run geoprocessing tools for a client who is running ArcGIS 9.3. However I only have access to ArcGIS 10.1. As a result I cannot use model builder in 10.1, and ...
4
votes
2answers
804 views

arcpy.da.SearchCursor - unique value get second field value

I have a feature class and using arcpy.da.SearchCursor I'm getting unique values of a field (e.g. Name). How can I use this method to get the associated row value of a different field (diff field = ...
3
votes
1answer
166 views

Beginning Arcpy: Asking for a quick review of my script

I cobbled this code together from ESRI documentation and stackexchange answers. I tried to use SearchCursor(points, fields=fieldname) but I get this error: TypeError: SearchCursor() got an ...
8
votes
3answers
368 views

Is there a way to tell the geodatabase version using Python?

I want to find out if either a file or personal geodatabase is 9.3, 10.0, 10.1, etc Is there a way to do this using Python?
1
vote
1answer
240 views

How to save an existing LYR file to use a relative path *and* have the LYR be v9.3 compatible?

Not sure if this is possible - I am writing a python script to convert LYR files to use relative paths and save the LYR as a 9.3 LYR file. I can do each one individually, but not together. ... # ...
3
votes
1answer
1k views

How to create an empty group layer within an existing group layer with arcpy.mapping?

Referencing this question, Add a new group layer with python ArcGIS 10, I'm trying to use python to add a empty group within a group layer. So far I'm able to add a empty group within the map ...
1
vote
1answer
140 views

Include Python Script with ArcObjects Addin

I'm building addin for 10.1 and need a method (ConvertToMSD) that's only available in ArcPY. I've figured out out how to execute a python script from an ArcObjects addin: Calling arcpy/python from ...
3
votes
3answers
346 views

How do I sort polygons by their latitude?

We have a set of polygons which we would like to sort and number according to their latitude. This will make it easier for local authorities to relate to the numbers of the objects. I have looked ...
7
votes
2answers
394 views

How to create a solar intensity map for a garden plot?

I'm interested in creating a raster surface that depicts the average solar intensity per unit area for a small garden plot. I imagine the inputs into the model would be the following: Plot ...
3
votes
2answers
222 views

Get the junction id for the roads in a network dataset

I have a network dataset with roads and junctions. I am wondering what class I can use in arcpy to extract FromJunctionId and the ToJunctionId for each road segment in the network dataset. Thanks.
2
votes
3answers
398 views

Field Type Date invalid when run in Python, but not in Model

Using ArcGIS Desktop Advanced 10.1 and PyScripter When running the arcpy.FeatureClassToFeatureClass_conversion, I get the error that the field type of Date is not valid. However, when running this ...
0
votes
1answer
314 views

How to add a graphic table element in Python without Production Mapping extension?

I'd like to add a table in the Map Layout that includes only items visible at the current extent of the dataset. I know that the Production Mapping Extension lets you insert a Graphic Table Element ...
1
vote
1answer
271 views

arcpy JoinField_managment RuntimeError

So, I've been banging my head against the wall the last few days trying to figure out what's wrong with my script. It's suppose to pull weekly flu data from a department of health website, parse it ...
4
votes
1answer
139 views

How to stack rasters for ecological analysis?

The attached image shows two different forest openings. Each opening has the following layers associated with it: Point shapefile 1 = A red X which represent a large "legacy" tree in the gap Point ...
1
vote
1answer
656 views

Error code 500 at REST Endpoint of published geoprocessing service - Problem with output parameter type?

Using ArcGIS 10.1 (Server and Desktop) I've been trying to publish a geoprocessing service based on a python script I wrote. Of course, it all works flawlessly from ArcGIS Desktop but I run into all ...
4
votes
1answer
134 views

convert a dbf into a raster image using python? work around for arcpy

ArcGIS' arcpy does not have a function to add a table to a layout. I was thinking that maybe taking that table (e.g. a dbf), there may be some python script command to turn it into a raster (e.g. do ...
0
votes
1answer
192 views

Problem with Extend Line tool in Arcpy

I have a problem with Extend Line tool in Arcpy, it cannot extend some lines, i tried to get around by erasing the edges of lines that i want to extend without failure, but despite this some fewer ...
5
votes
2answers
919 views

How to implement bivariate Ripley's K function in ArcGIS 10?

The attached image shows a forest gap with red pine represented as circles and white pine represented as crosses. I am interested in determining if there is a positive or negative association between ...
4
votes
1answer
95 views

How to detect densely labelled areas?

I'm trying to detect densely labelled areas for a given scale like explained below. so dense labelled area is the area having high rate of overlapping labels. I'd like to detect densely labelled ...
3
votes
1answer
409 views

Zoom to Shapefile attribute table row feature

I am working with the python code below in ArcGIS to zoom into a shapefile's attribute table row features without selected until the end of table one by one. I am trying to use this code but this one ...
11
votes
4answers
3k views

How to manually break statement execution in python console of ArcMap

How does one break the execution of a long-running process in the python console of ArcMap? For example, how do you break a long iteration like the one below once it is started? for i in range(1, ...
0
votes
1answer
611 views

Using arcpy to set field values for all features within each polygon of a separate feature class

I am trying to set a field value in one feature class (TRU) based on the value of a field in a separate feature class (DerivedBoundaries) that contains the first, using python in ArcGIS 10.1. I have ...
4
votes
1answer
857 views

How to List field name aliases in ONE shapefile/layer using ArcPy?

I want to use arcpy/python to print out a list of all the field name aliases for a specified shapefile. So far I have been able to hack a script I found to list all the field name aliases associated ...
8
votes
1answer
166 views

The role of '#' in a python 'if':

I recently exported an ArcGIS model to python and was reviewing the script and am confused by the following line: if TRU_W_DatableFeatures == '#' or not TRU_W_DatableFeatures: I can't seem to find ...
5
votes
1answer
1k views

How to Make a New Shapefile Based on Attributes of an Existing Shapefile?

In my last post I had an issue where I wanted to create multiple shapefiles based on only one attribute field (years). How to do it was answered in that post. I want to make that tool more dynamic so ...
5
votes
2answers
975 views

How to replace arcpy.CalculateField_management with an update cursor?

I'd like to replace this expression arcpy.CalculateField_management(bufferFile, "Shape_Area", "float('!shape.area@squaremeters!')", "PYTHON") with an arcpy.da.updatecursor. The reason for this is ...
1
vote
1answer
487 views

How to use python to export ArcGIS Server Map Service Properties?

What arcpy module can I use to write a python script to mine for fields of my map service properties and export them to a .tx file? I assume we need to tap into GIS Servers within the ArcCatalog ...
4
votes
1answer
161 views

How to set page size in Arcpy?

It is possible to set Page size in arcpy, i'm looking for any tricky way to set the page size, using pure python or Arcpy. Thanks in advance
2
votes
2answers
301 views

How to calculate the surface using Lambert correction?

i'm using lambert conformal conic , so we have distortions along any given parallel , i would like to get the area used to solve this distortion. I have calculated the area using Shoelace formula , ...
4
votes
2answers
1k views

Why is Layer missing from Export to PDF?

I am using the arcpy module to loop through a number of map features (community areas), zoom to them, title the map with the name of the community area, and export to pdf. The trouble is that while ...
2
votes
1answer
179 views

Index for data driven page created atlas

We have a parcel atlas created from a data driven page document where each page represents a particular 16 mile square township. I have created my own index of polygons instead of ArcGIS index ...
3
votes
1answer
195 views

How can I put coded domains into a list to be created in python script?

I have a large list of coded domains. They are numbers like: 01.6530.01, 05.7991.08, 05.7991.01, 05.7991.06 The code will be the exact same as the description. I've tried to make a list using: ...
5
votes
3answers
252 views

What's the centerline of a peninsula?

Given a peninsula stretching north south and the two coast lines connecting in the south, I want to find out which is the place, or rather line, which is furthest away from both coastlines on the ...
5
votes
2answers
583 views

Problem with the where clause in ArcGIS when dealing with variables

I am writing a python script for ArcGIS. I have an input feature class which contains multiple pipelines which is saved as a variable InputPipeline. I would like to iterate through the pipelines and ...
2
votes
1answer
638 views

Layers not appearing when updated with UpdateLayer in arcpy

I have a script that calculates kernel density for several sets of points, adds the output to a base map, updates the added layer to use the same color scheme and resampling function of a template ...
5
votes
1answer
818 views

How to keep spatial reference using arcpy.RasterToNumPyArray?

I am using ArcGIS 10.1, and want to create a new raster based on two preexisting rasters. The RasterToNumPyArray has a good example which I want to adapt. import arcpy import numpy myArray = ...