Subject: Marine Geospatial Ecology Tools (MGET) help
Text archives
From: | |
---|---|
To: | |
Subject: | ArcGISRasterSamplerSampleRasters |
Date: | Thu, 11 Dec 2008 19:54:40 -0500 (EST) |
Hi MGET-ers.
I'm new to the list and new to the GeoEco toolbox, so here goes...
I'm trying to sample all the rasters (including multiple raster bands) in a
directory using the ArcGISRasterSamplerSampleRasters tool. All the rasters are
Erdas IMAGEs (.img), 7 are single-band, 3 are 3-band, and 3 are 6-band images,
for a total of 34 fields being added to my point shapefile.
I originally downloaded the toolbox because I had previously tried Python to
use the "Sample" command and also to loop through "Extract Values to Points",
but ran into errors in both. (The former would not allow that many rasters to
be sampled, and the latter just failed at various places, giving the "ERROR
99999: unknown error" message.)
So, can the ArcGISRasterSamplerSampleRasters tool sample all bands of
multi-band rasters, or do I need to copy each band as a single-band raster?
I'm
running the tool unsuccessfully in a Python script now, but I get no error
messages when it fails, so I'm guessing that this is the problem. Here's the
pseudocode of what I'm doing:
rasters = 'raster1.img;raster2.img\Band_1;raster2.img\Band_2...'
fields = 'raster1;raster2_1;raster2_2...'
gp.ArcGISRasterSamplerSampleRasters(shapefile, rasters, fields)
Thanks,
Joe
I'm new to the list and new to the GeoEco toolbox, so here goes...
I'm trying to sample all the rasters (including multiple raster bands) in a
directory using the ArcGISRasterSamplerSampleRasters tool. All the rasters are
Erdas IMAGEs (.img), 7 are single-band, 3 are 3-band, and 3 are 6-band images,
for a total of 34 fields being added to my point shapefile.
I originally downloaded the toolbox because I had previously tried Python to
use the "Sample" command and also to loop through "Extract Values to Points",
but ran into errors in both. (The former would not allow that many rasters to
be sampled, and the latter just failed at various places, giving the "ERROR
99999: unknown error" message.)
So, can the ArcGISRasterSamplerSampleRasters tool sample all bands of
multi-band rasters, or do I need to copy each band as a single-band raster?
I'm
running the tool unsuccessfully in a Python script now, but I get no error
messages when it fails, so I'm guessing that this is the problem. Here's the
pseudocode of what I'm doing:
rasters = 'raster1.img;raster2.img\Band_1;raster2.img\Band_2...'
fields = 'raster1;raster2_1;raster2_2...'
gp.ArcGISRasterSamplerSampleRasters(shapefile, rasters, fields)
Thanks,
Joe
Archives powered by MHonArc.