Quantcast
Channel: Forums - Python
Browsing all 2485 articles
Browse latest View live

where did my polygon go?

I'm again at work on some legacy code, and I'm stumpled on why one bit is not working as I'd expect. Here is the code snippet: Code: def poly2xylist(layer):     arcpy.CopyFeatures_management(layer,...

View Article


I want to zonal statistics for multiple raster.

Hi, now, i use only single zonal statistics module. but i want to multiple zonal tool. # Import arcpy module import arcpy, os from arcpy import env from arcpy.sa import * # Check out any necessary...

View Article


strange value.. of zonal statistic. by arcpy (arcgis 10)

I want to proceed zonal at the one time. so i completed! BUT!! result,, value is SAME! T.T...... how can i do it? # Import arcpy module import arcpy, os from arcpy import env from arcpy.sa import * #...

View Article

Getting "invalid command error" when giving command to CLI interface

Hello, I have written a script in which I am telnetting from system1 to system2. There from system2 I am doing ssh to system3. This system3 is a Embedded Board running Linux.Here on system3 I am...

View Article

How do I get list of fields from feature class/shapefile using tool?

I'm making a custom tool that will allow the user to make many different changes to the fields of a chosen feature class or shapefile. Part of my code is: Code: fc = arcpy.GetParameterAsText(0) And...

View Article


Zonal Statistics Error 010240: Could not save raster dataset with output...

I wrote simple python code to do zonal statistics. My zonal input is a shapefile with a grid of equal-sized polygons. My input values are a raster of groundwater surface. Here is my code: Code: #...

View Article

Tip: Python Addin - getting custom tools/toolbox to work - GPToolDialog

The “TypeError: GPToolDialog() takes at most 1 argument (2 given)” is a very misleading message and is a bug (NIM089253) This process helped me get rid of this message and was a simple was to add my...

View Article

Inconsistent Select By Location behavior

For the purposes of discussion, building a Topology is not an option, otherwise this exercise would be easy. I am performing the same Select By Location two different ways. The first method, let's say...

View Article


I NEED TO SEPARATE THE VALUES OF A FIELD INTO 2 SEPARATE FIELDS

I have a field called direction that contains values such as 319.135, I want to separate the contents of the field into 2 different fields such that 1 of the fields would read 319 and the other 14 (I...

View Article


ExecuteError: ERROR 999999: Error executing function.

i got the this error message. what's wrong to me? Traceback (most recent call last): File "C:/Users/Administrator/Desktop/arcpy/convert", line 36, in <module> saveRaster =...

View Article

Split lines at point intersect - Split Lines at Points

Hi, any help is welcome… I need to split some lines where it intersects with points. I used the Split Lines at Points but the output is not what I expected. Thanks in advanced!!

View Article

Select Layer by attributes PYthon scripting through files

Hi guys, Just a quick question as i've been having trouble with my python script that I"ve been trying to implement. The issue here is that everytime when I try to run my script, I keep getting the...

View Article

Python Add-In Tool and Python Window (ArcMap 10.1)

I am getting some strange behavior with any Python Add-In tool that I deploy. I only noticed this because I have a tool that reports map x/y values as the mouse pans across the data view (aka,...

View Article


Do I need to use Python?

Labeling specific comments I was wondering if this can only be achieved by using Python. I have polygons that I need to label. The expression it looks something like...

View Article

Feature Outline Masks tool not working in geoprocessing service ArcGIS 10.1

I have a Python toolbox custom tool that exports maps from a template MXD, and one of the geoprocessing tools I'm using in the custom tool is Feature Outline Masks. This tool only works at the ArcGIS...

View Article


Method to create unique values for two related attributes and make two variables

Hi All, The situation: 1 FC / 3 related columns / definitionQuery on one field has ' as part of field name for only some records which is causing problems Column 1 = numeric code Coumns 2 and 3 = text...

View Article

invalid syntax: MakeFeatureLayer_management

Have both the streams and schools layers in my active arcmap session. I am using arcmap's Python window to run this script in a python tutorial that finds schools within a specified distance from...

View Article


Image may be NSFW.
Clik here to view.

Exporting multiple maps as images at a time,

Exporting multiple maps as images at a time, I wanted to export 12 maps at a time such that only 2 layers are turned on: the layer of lines and one of the buildings. The layer of buildings contains 12...

View Article

Batch Routing and Creating Directions Output

I have a large university dataset of handicap routes. I am trying to create separate routes and directions for every possible combination of start and end points. I have 298 locations which leads to...

View Article

append issue - model builder vs python

Hi, I am trying to append a feature class from fgdb to sde geodatabase. I created the model builder with append tool, everything working fine.. But after I export the same as python, while executing I...

View Article
Browsing all 2485 articles
Browse latest View live