[Gdal-dev] Re: GDAL and Spot Vegetation

Markus Neteler neteler at itc.it
Wed Aug 18 10:56:19 EDT 2004


Hi Vincent,

On Wed, Aug 18, 2004 at 04:45:56PM +0200, Vincent Schut wrote:
> Hi Markus (cc-ing the gdal list; people might be interested in this :-),
> 
> indeed gdal doesn't read any geographic info that might be in the hdr file 
> (actually I don't know if there is some...).

Using HDFLook I was able to extract from 0001_NDV.HDF
1: ( 5601 x 8177 ) PIXEL DATA
 [image]
 Set no 0: Rank: 2, 5601 x 8177
	Data set name: 'PIXEL DATA'
	Data type: 8-bit unsigned integer
 SDS attributes
	Number of attributes: 1
		valid_range:	0,  255
 Global attributes: 0 

2:[VD] (    3 x   40) NDVI : IMAGE INFORMATION
 vdata_name:      NDVI
 fieldname_list: IMAGE INFORMATION
 n_records     : 3
 interlace_mode: 0
 data_size     : 40
 VFnfields     : 1
   01[field] name: IMAGE INFORMATION (8-bit character) size: 40  order: 40
 Global attributes: 0 

3:[VD] (    2 x   40) NDVI : CALIBRATION PARAMETERS
 File size 40X2 Show size 0 -> 40 X 0 -> 2
 NDVI_COEF_A              0.004          
 NDVI_OFFSET_B            -0.1

#######
cat 0001_LOG.TXT
PRODUCT_ID                V2KRND10__20040101E
BAND_REF                  B0
QUICK_LOOK_BAND           NDV
MAP_PROJ_NAME             PLATE_CARREE_1KMG nom provisoirement egal au code
MAP_PROJ_FAMILY           UNPROJECTED
MAP_PROJ_CODE             PLATE_CARREE_1KMG
MAP_PROJ_UNIT             DEGREES
MAP_PROJ_RESOLUTION       0.0089285714
GEODETIC_SYST_NAME        WGS 1984
GEODETIC_SYST_CODE        WG84
[...]


> What I did was using a 'vgt_unzip' script,which did the following if I 
> remember well:
> - parse the .zip filename for the region and the date, and store these

So one seems to have to parse the 0001_LOG.TXT (sigh).

> - unzip the file into a temp directory (all vegetation zip files unzip in the 
> same 0001/ directory, handy that is :-/ )
> - copy the right vrt file (for that region) to this temp dir. I created vrt 
> file for the 2 regions I used, which I kept in a 'vrt_templates' dir; the vrt 
> files refer to the vgt hdr files with relative path names (a feature Frank 
> Warmerdam implemented especially for this purpose on my request), thus they 
> become meaningfull when copied to a dir with the right .hdr files.)
> - gdaltranslate this vrtfile to a geotiff file, giving the geotiff file some 
> meaningfull name like $region_$date_s10.tif or something like that
> - copy this geotiff file (if everyting went OK) to a spotveg data dir, which 
> will contain all these geotiff files in the end.
> empty and remove the temp dir.
> 
> I can't seem to find the script right now, should have it somewhere around 
> here but haven't used it for some time. But using the above guidelines you 
> should be able to write your own. Mine was not very fancy & robust, either...

OK, thanks for your insights.

Markus
 
> On Wednesday 18 August 2004 14:46, you wrote:
> > Hi Vincent,
> >
> > while digging in the GDAL archive I came across this
> > message:
> >
> >  http://xserve.flids.com/pipermail/gdal-dev/2004-March/005134.html
> >
> > Did you ever manage to read the SPOT Vegetation NDVI
> > data as available from http://free.vgt.vito.be/?
> >
> > The file of interest seems to be
> >  0001_NDV.HDF
> > but GDAL only outputs xy pixels...
> >
> > Maybe you have a receipt using VRT?
> >
> > Thanks in advance
> >
> >  Markus
> 
> -- 
> -----------------------------
>  Vincent Schut
>  SarVision B.V.
>  Wageningen, The Netherlands
>  www.sarvision.com



More information about the Gdal-dev mailing list