POST
|
I have a shapefile that I want to programatically join with 12 other tables, retaining exactly 2 fields from each of the join tables. These 12 other tables are all in the same gdb as one another, and while their names differ, the unique part of each name is at the end (TABLE_000001, TABLE_000002,..., TABLE_000012), so that when I join them with arcpy.AddJoin_management, the fieldnames are truncated into something indecipherable when I export to a new table. Since I cannot add fields to a joined table, my idea of creating new fields with the names I want after each join does not work. Any idea how I can do this join and retain meaningful field names?
... View more
04-07-2014
11:54 AM
|
0
|
0
|
547
|
POST
|
Simple question but I can't seem to find an answer anywhere - is there a way to export raster attributes (e.g., mean, cell size) to a a variable? I'm converting a tool from a Python script to a model, and the tool buffers a polygon by a distance equal to the cell size of a DEM raster. Is there a (simple) way to do this in MB?
... View more
01-15-2013
10:09 AM
|
0
|
1
|
708
|
POST
|
Has anybody used the "clone(point_object)" method of a point or other geometry object? I cannot seem to find any documentation or examples of how to use this. I have tried both: (1) implementing this method on an existing point and providing a new (blank) point as the 'point_object' attribute, and (2) implementing this method on a new (blank) point and providing the existing point as the 'point_object' attribute. In each case, I get the error "Clone input not point object".
... View more
12-05-2012
06:48 AM
|
0
|
0
|
318
|
POST
|
Thanks for all the information. It's hard to believe that ESRI has let this problem go on for so long, isn't iterative geoprocessing one of the primary reasons for scripting? Does anybody know if there's a way to manipulate the garbage to collector to purge all but a few memory items between iterations? The only Python-related workaround I've come across is to spawn separate processes, but this seems to be somewhat cumbersome and complicated (I'm trying to keep my code relatively simple for ease of customization).
... View more
12-14-2011
06:37 AM
|
0
|
0
|
954
|
POST
|
I have had this problem too, but been able to fix it simply by rebooting ArcMap. Don't know what to tell you.
... View more
12-09-2011
05:30 AM
|
0
|
0
|
413
|
POST
|
InASCIIList = arcpy.GetParameterAsText(0) arcpy.AddMessage ("InASCIIList is " + InASCIIList) InASCII = InASCIIList.split(";") for InASCII in InASCIIList: arcpy.AddMessage ("InASCII is " + InASCII) You split the string InASCIIList into a list called InASCII with the split() method, but then iterate through the string InASCIIList instead of the list InASCII. Try this: InASCIIString = arcpy.GetParameterAsText(0) arcpy.AddMessage ("InASCIIString is " + InASCIIString) InASCIIList = InASCIIString.split(";") for InASCII in InASCIIList: arcpy.AddMessage ("InASCII is " + InASCII)
... View more
12-08-2011
12:14 PM
|
0
|
0
|
186
|
POST
|
Yes, I'm running it as a script tool. An example might be: line_shapefile = "C:\Users\jhook\Desktop\lines.shp" for i in range(0, 100, 1): geom_obj = arcpy.CopyFeatures_management(line_shapefile, arcpy.Geometry()) arcpy.Delete_management(geom_obj) del geom_obj Memory usage continues to grow through this whole process despite my attempts to delete the geometries created.
... View more
12-07-2011
12:36 PM
|
0
|
0
|
954
|
POST
|
This may be a dumb question, but how do you determine in the ToolValidator class whether an input parameter has been left blank? Some of the parameters in my tool are optional in some cases, and required in others. I would like to raise an error when a field is left blank under certain circumstances.
... View more
12-07-2011
08:25 AM
|
0
|
2
|
731
|
POST
|
Update: the memory appears to spike when a Geometry object is created, but deleting the object, neither through Python's "del" command nor with arcpy.Delete_management, causes it to abate. Does anybody know how to delete a geometry object?
... View more
12-02-2011
08:51 AM
|
0
|
0
|
954
|
POST
|
I have a script which iterates through a set of points and performs a variety of raster and vector analyses. Watching the Mem Usage in Windows Task Manager, it appears that more and more memory is used until ArcMap crashes at around 1 GB. Are there any effective ways for identifying the source of the runaway memory leak?
... View more
12-02-2011
05:53 AM
|
0
|
7
|
2571
|
POST
|
Thanks! For others who may be interested in a solution, it also worked to reduce the number of zones in the zone feature class. Apparently this is a combination of value raster and zone layer size.
... View more
09-14-2011
11:26 AM
|
0
|
0
|
988
|
POST
|
I have a large polygon layer representing a few thousand fields, and raster layer with 3 land cover classes. I would like to summarize each field with a single land cover class, and the only tool I can think of to accomplish this is Zonal Statistics. Problem is, when I try to run Zonal Statistics, I get ERROR 999999, "Too many unique values". What are the limitations on this tool, and is there a better way to perform this summary?
... View more
09-13-2011
07:29 AM
|
1
|
2
|
4523
|
POST
|
It printed the correct path for the DEM as indicated in the commented part of the line. If I change the input to a path that doesn't exist, it returns an error saying the layer doesn't exist, instead of the error saying it simply failed to load.
... View more
01-27-2011
04:53 AM
|
0
|
0
|
686
|
POST
|
I wrote a python script that works beautifully, but when I try to run it as a script from ArcToolbox, it crashes when I try to do an Extract By Mask. Here is the problem script: import arcpy from arcpy import env from arcpy.sa import * arcpy.CheckOutExtension("Spatial") # Loads Spatial Analyst extension dem = arcpy.GetParameterAsText(0) arcpy.AddMessage(dem) # "C:/Elevation Files/dem_file" bsnDEM = ExtractByMask(dem, basinFile) Which raises the error: <class 'arcgisscripting.ExecuteError'>: ERROR 999999: Error executing function. Failed to open raster dataset Failed to execute (ExtractByMask). Why would this work outside of a tool but not when executed from the toolbox?
... View more
01-26-2011
02:34 PM
|
0
|
3
|
5183
|
Title | Kudos | Posted |
---|---|---|
1 | 09-13-2011 07:29 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|