POST
|
I've read through the tool help, and done search after search in google, and nowhere can I find a description of the output feature class produced by the contour tool. Specifically, I'd like to know the fields that would be populated in any output contour shapefile for use in other steps in a python script. I was hoping to find this documented somewhere so I didn't have to do a 'test' contour to see what the output format will be, as the rasters I'm working with are fairly big, so that's a lot of processing time to find out something that should be explained in the documentation. Am I missing something obvious, or is this just omitted from the Contour tool help and item description?
... View more
08-03-2015
04:48 PM
|
0
|
2
|
2615
|
POST
|
Thanks R_ I'm honestly not sure that's my problem, because while I usually use a variable to store my filenames and paths, out of some vague notion that that's a programming best practice, my most recent bump against this issue involved me directly adding the path/name to the code. Here's the offending code:
arcpy.PolygonToRaster_conversion(bldglayer, "bldgtype", 'workingFGDB.gdb\\bldgtile' + str(i) + '_' + str(j), "#")
bldgnull = sa.IsNull('workingFGDB.gdb\\bldgtile')
bldgnull.save('workingFGDB.gdb\\bldgtilenull')
nobldgtile = sa.Con(lulcnullname, 0, geolulcname, "VALUE > 0")
nobldgtile.save('workingFGDB.gdb\\nobldgtile')
lulctile = sa.Con('workingFGDB.gdb\\bldgtilenull', 'workingFGDB.gdb\\nobldgtile', 'workingFGDB.gdb\\bldgtile', "VALUE > 0")
lulctile.save(lulctilename)
For reference, this is taking a set of building classes from a building outline polygon file and adding them to a land-use/land-cover dataset. The second iteration of this bit of code results in a cannot-delete-dataset error. Once I changed the various intermediate "bldgtilenull/nobldgtile/etc' names to variables with the iteration index tacked on, it worked fine (except for filling my FGDB with files I no longer needed). A workaround would be to just toss those raster names in a list and then to an iterative delete at the end of the process to remove them, but I'd rather do it as I go just using the 'overwriteOutput' environment variable.
... View more
05-31-2013
02:06 PM
|
0
|
0
|
1251
|
POST
|
I'm running it standalone from a batch script, so there isn't a dataframe. I'm new to this level of geoprocessing from scripts (I have traditionally done this kind of work in ERDAS Imagine, but needed more automation for this particular task), so it's possible that there's something similar that's keeping things in memory longer than I'd like. But I can't figure out what it might be.
... View more
05-29-2013
10:41 PM
|
0
|
0
|
1251
|
POST
|
When attempting to delete or overwrite a scratch raster in a raster geodatabase, I keep getting errors along the lines of "Error: 000871 : Unable to delete the output" I'm working on an iterated series of raster processes, which involves a lot of intermediate rasters for each iteration. I'm forced, for dumb engineering reasons, to use decimal seconds, so only saved rasters in a file geodatabase seem to work - IMGs and GRIDs and temporary grids cause errors in decimal seconds. The problem I have is this. For some relatively long (geoprocessing wise) period of time after I've finished reading from or writing to a raster, the raster remains locked, and cannot be overwritten nor deleted. Currently, I'm working around this problem by writing each intermediate raster to a unique filename. This leaves me with a massive collection of unneeded intermediate files cluttering up my geodatabase. I have tried just setting env.overwriteOutput = True, and just writing/overwriting a scratch filename each iteration, and I've tried using the arcpy.Delete_management() function at the end of each iteration, and still get the ERROR 000871. Is there a way to force arcpy/Arc/python to release a file in the operating system, or is there something I'm leaving out that would cause them to be released? My google fu is failing me. FWIW, running ArcGIS 10.0 (ArcInfo) with Spatial Analyst on Win7 64-bit.
... View more
05-29-2013
06:03 PM
|
1
|
7
|
5693
|
Title | Kudos | Posted |
---|---|---|
1 | 05-29-2013 06:03 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|