[Gdal-dev] GDAL 1.2.1 Released - HDF error

Lorenzo Moretti lorenzo.moretti at bologna.enea.it
Mon Jun 28 11:14:03 EDT 2004


Until GDAL 1.2.0 I have HDF4 support and it works.
Now I've compiled new GDAL with new HDF-EOS support and I have this problem:

When I use gdalinfo for HDF file the output is similar:

OUTPUT FRO GDAL 1.2.0

[lor:~] lor% gdalinfo 
/Volumes/ASTER_files/AST_L1B_003_01102002101254_05222002150244.hdf
Driver: HDF4/Hierarchical Data Format Release 4
Size is 512, 512
Coordinate System is `'
Metadata:
   HDFEOSVersion=HDFEOS_V2.6
   IDOFASTERGDSDATAGRANULE=ASTL1B 0201101012540205220094
.....

.....
    QAPERCENTINTERPOLATEDDATA=0.000000
   REPROCESSINGACTUAL=not reprocessed
   PGEVERSION=04.00R06
   PROCESSINGLEVELID=1B
   MAPPROJECTIONNAME=Universal Transverse Mercator
Subdatasets:
 
SUBDATASET_1_NAME=HDF4_SDS:ASTER_L1B:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":2
   SUBDATASET_1_DESC=[4200x4980] ImageData1 (8-bit unsigned integer)
 
SUBDATASET_2_NAME=HDF4_SDS:ASTER_L1B:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":3
   SUBDATASET_2_DESC=[4200x4980] ImageData2 (8-bit unsigned integer)
 
SUBDATASET_3_NAME=HDF4_SDS:ASTER_L1B:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":4
   SUBDATASET_3_DESC=[4200x4980] ImageData3N (8-bit unsigned integer)
 
SUBDATASET_4_NAME=HDF4_SDS:ASTER_L1B:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":5
   SUBDATASET_4_DESC=[4600x4980] ImageData3B (8-bit unsigned integer)
 
SUBDATASET_5_NAME=HDF4_SDS:ASTER_L1B:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":8
   SUBDATASET_5_DESC=[2100x2490] ImageData4 (8-bit unsigned integer)
 
SUBDATASET_6_NAME=HDF4_SDS:ASTER_L1B:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":9
   SUBDATASET_6_DESC=[2100x2490] ImageData5 (8-bit unsigned integer)
 
SUBDATASET_7_NAME=HDF4_SDS:ASTER_L1B:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":10
   SUBDATASET_7_DESC=[2100x2490] ImageData6 (8-bit unsigned integer)
 
SUBDATASET_8_NAME=HDF4_SDS:ASTER_L1B:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":11
   SUBDATASET_8_DESC=[2100x2490] ImageData7 (8-bit unsigned integer)
 
SUBDATASET_9_NAME=HDF4_SDS:ASTER_L1B:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":12
   SUBDATASET_9_DESC=[2100x2490] ImageData8 (8-bit unsigned integer)
 
SUBDATASET_10_NAME=HDF4_SDS:ASTER_L1B:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":13
   SUBDATASET_10_DESC=[2100x2490] ImageData9 (8-bit unsigned integer)
 
SUBDATASET_11_NAME=HDF4_SDS:ASTER_L1B:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":16
   SUBDATASET_11_DESC=[700x830] ImageData10 (16-bit unsigned integer)
 
SUBDATASET_12_NAME=HDF4_SDS:ASTER_L1B:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":17
   SUBDATASET_12_DESC=[700x830] ImageData11 (16-bit unsigned integer)
 
SUBDATASET_13_NAME=HDF4_SDS:ASTER_L1B:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":18
   SUBDATASET_13_DESC=[700x830] ImageData12 (16-bit unsigned integer)
 
SUBDATASET_14_NAME=HDF4_SDS:ASTER_L1B:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":19
   SUBDATASET_14_DESC=[700x830] ImageData13 (16-bit unsigned integer)
 
SUBDATASET_15_NAME=HDF4_SDS:ASTER_L1B:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":20
   SUBDATASET_15_DESC=[700x830] ImageData14 (16-bit unsigned integer)
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,  512.0)
Upper Right (  512.0,    0.0)
Lower Right (  512.0,  512.0)
Center      (  256.0,  256.0)


OUTPUT FRO GDAL 1.2.1

[lor:~] lor% gdalinfo 
/Volumes/ASTER_files/AST_L1B_003_01102002101254_05222002150244.hdf
Driver: HDF4/Hierarchical Data Format Release 4
Size is 512, 512
Coordinate System is `'
Metadata:
   HDFEOSVersion=HDFEOS_V2.6
   IDOFASTERGDSDATAGRANULE=ASTL1B 0201101012540205220094
.....

.....
   QAPERCENTINTERPOLATEDDATA=0.000000
   REPROCESSINGACTUAL=not reprocessed
   PGEVERSION=04.00R06
   PROCESSINGLEVELID=1B
   MAPPROJECTIONNAME=Universal Transverse Mercator
Subdatasets:
 
SUBDATASET_1_NAME=HDF4_EOS:EOS_SWATH:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":VNIR_Swath:ImageData1
   SUBDATASET_1_DESC=[4200x4980] ImageData1 (8-bit unsigned integer)
 
SUBDATASET_2_NAME=HDF4_EOS:EOS_SWATH:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":VNIR_Swath:ImageData2
   SUBDATASET_2_DESC=[4200x4980] ImageData2 (8-bit unsigned integer)
 
SUBDATASET_3_NAME=HDF4_EOS:EOS_SWATH:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":VNIR_Swath:ImageData3N
   SUBDATASET_3_DESC=[4200x4980] ImageData3N (8-bit unsigned integer)
 
SUBDATASET_4_NAME=HDF4_EOS:EOS_SWATH:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":VNIR_Swath:ImageData3B
   SUBDATASET_4_DESC=[4600x4980] ImageData3B (8-bit unsigned integer)
 
SUBDATASET_5_NAME=HDF4_EOS:EOS_SWATH:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":SWIR_Swath:ImageData4
   SUBDATASET_5_DESC=[2100x2490] ImageData4 (8-bit unsigned integer)
 
SUBDATASET_6_NAME=HDF4_EOS:EOS_SWATH:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":SWIR_Swath:ImageData5
   SUBDATASET_6_DESC=[2100x2490] ImageData5 (8-bit unsigned integer)
 
SUBDATASET_7_NAME=HDF4_EOS:EOS_SWATH:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":SWIR_Swath:ImageData6
   SUBDATASET_7_DESC=[2100x2490] ImageData6 (8-bit unsigned integer)
 
SUBDATASET_8_NAME=HDF4_EOS:EOS_SWATH:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":SWIR_Swath:ImageData7
   SUBDATASET_8_DESC=[2100x2490] ImageData7 (8-bit unsigned integer)
 
SUBDATASET_9_NAME=HDF4_EOS:EOS_SWATH:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":SWIR_Swath:ImageData8
   SUBDATASET_9_DESC=[2100x2490] ImageData8 (8-bit unsigned integer)
 
SUBDATASET_10_NAME=HDF4_EOS:EOS_SWATH:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":SWIR_Swath:ImageData9
   SUBDATASET_10_DESC=[2100x2490] ImageData9 (8-bit unsigned integer)
 
SUBDATASET_11_NAME=HDF4_EOS:EOS_SWATH:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":TIR_Swath:ImageData10
   SUBDATASET_11_DESC=[700x830] ImageData10 (16-bit unsigned integer)
 
SUBDATASET_12_NAME=HDF4_EOS:EOS_SWATH:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":TIR_Swath:ImageData11
   SUBDATASET_12_DESC=[700x830] ImageData11 (16-bit unsigned integer)
 
SUBDATASET_13_NAME=HDF4_EOS:EOS_SWATH:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":TIR_Swath:ImageData12
   SUBDATASET_13_DESC=[700x830] ImageData12 (16-bit unsigned integer)
 
SUBDATASET_14_NAME=HDF4_EOS:EOS_SWATH:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":TIR_Swath:ImageData13
   SUBDATASET_14_DESC=[700x830] ImageData13 (16-bit unsigned integer)
 
SUBDATASET_15_NAME=HDF4_EOS:EOS_SWATH:"/Volumes/PB_APPLI/LAVORI/MAPPE/ASTER_FO_gen02/AST_L1B_003_01102002101254_05222002150244.hdf":TIR_Swath:ImageData14
   SUBDATASET_15_DESC=[700x830] ImageData14 (16-bit unsigned integer)
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,  512.0)
Upper Right (  512.0,    0.0)
Lower Right (  512.0,  512.0)
Center      (  256.0,  256.0)


THE DIFFERENCES ARE AT THE END.
Now I have a band description.
But the error is after when I select one band.


OUTPUT FRO GDAL 1.2.0

[lor:~] lor% gdalinfo 
HDF4_SDS:ASTER_L1B:"/Volumes/ASTER_files/AST_L1B_003_01102002101254_05222002150244.hdf":2
Driver: HDF4Image/HDF4 Dataset
Size is 4980, 4200
Coordinate System is:
PROJCS["UTM Zone 33, Northern Hemisphere",
     GEOGCS["WGS 84",
         DATUM["WGS_1984",
             SPHEROID["WGS 84",6378137,298.257223563,
                 AUTHORITY["EPSG","7030"]],
             TOWGS84[0,0,0,0,0,0,0],
             AUTHORITY["EPSG","6326"]],
         PRIMEM["Greenwich",0,
             AUTHORITY["EPSG","8901"]],
         UNIT["degree",0.0174532925199433,
             AUTHORITY["EPSG","9108"]],
         AXIS["Lat",NORTH],
         AXIS["Long",EAST],
         AUTHORITY["EPSG","4326"]],
     PROJECTION["Transverse_Mercator"],
     PARAMETER["latitude_of_origin",0],
     PARAMETER["central_meridian",15],
     PARAMETER["scale_factor",0.9996],
     PARAMETER["false_easting",500000],
     PARAMETER["false_northing",0],
     UNIT["Meter",1]]
GeoTransform =
   273342.0580804553, 14.62007381662245, -3.354636379426534
   4820040.394499515, -3.354618932788324, -14.6200685003371
GCP Projection = GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 
84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AXIS["Lat",NORTH],AXIS["Long",EAST],AUTHORITY["EPSG","4326"]]
GCP[  0]: Id=, Info=
           (0.5,0.5) -> (12.1965,43.4988,0)
GCP[  1]: Id=, Info=
           (498.5,0.5) -> (12.2872,43.486,0)
GCP[  2]: Id=, Info=
           (996.5,0.5) -> (12.3778,43.4731,0)
.....

.....
   PROJECTIONPARAMETERS14=6378137.000000, 6356752.300000, 0.999600, 
0.000000, 0.261799, 0.000000, 500000.000000, 0.000000, 0.000000, 
0.000000, 0.000000, 0.000000, 0.000000
   UTMZONECODE14=33
   INCL14=0.005225
   OFFSET14=-0.005225
   CONUNIT14=W/m2/sr/um
   SHORTNAME=ASTL1B
   SIZEMBDATAGRANULE=119.230000
   PRODUCTIONDATETIME=2002-05-22T15:02:44.000Z
   PLATFORMSHORTNAME=AM-1
   INSTRUMENTSHORTNAME=ASTER
   WESTBOUNDINGCOORDINATE=12.049274
   NORTHBOUNDINGCOORDINATE=43.498844
   EASTBOUNDINGCOORDINATE=13.101212
   SOUTHBOUNDINGCOORDINATE=42.811432
   TIMEOFDAY=101254443000Z
   CALENDARDATE=20020110
   FUTUREREVIEWDATE=20020312
   SCIENCEREVIEWDATE=20011201
   QAPERCENTMISSINGDATA=0.000006
   QAPERCENTOUTOFBOUNDSDATA=0.000006
   QAPERCENTINTERPOLATEDDATA=0.000000
   REPROCESSINGACTUAL=not reprocessed
   PGEVERSION=04.00R06
   PROCESSINGLEVELID=1B
   MAPPROJECTIONNAME=Universal Transverse Mercator
Corner Coordinates:
Upper Left  (  273342.058, 4820040.394) ( 12d11'47.31"E, 43d29'56.12"N)
Lower Left  (  259252.585, 4758636.107) ( 12d 2'57.12"E, 42d56'32.39"N)
Upper Right (  346150.026, 4803334.392) ( 13d 6'4.10"E, 43d22'1.61"N)
Lower Right (  332060.553, 4741930.105) ( 12d56'45.26"E, 42d48'41.44"N)
Center      (  302701.305, 4780985.250) ( 12d34'23.91"E, 43d 9'21.21"N)
Band 1 Block=4980x1 Type=Byte, ColorInterp=Gray


OUTPUT FRO GDAL 1.2.1

[polar:~] ben% gdalinfo 
HDF4_EOS:EOS_SWATH:"/Volumes/ASTER_files/AST_L1B_003_01102002101254_05222002150244.hdf":VNIR_Swath:ImageData1
Driver: HDF4Image/HDF4 Dataset
Size is 4980, 4200
Coordinate System is `'
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0, 4200.0)
Upper Right ( 4980.0,    0.0)
Lower Right ( 4980.0, 4200.0)
Center      ( 2490.0, 2100.0)
Band 1 Block=4980x1 Type=Byte, ColorInterp=Gray


Now I've lost the projection and now I can not translate with 
gdalwarp for importing in grass. In Grass 5.7 there is a module 
r.in.aster from Michael Burton based on this method and it's very 
easy method for importing ASTER files in GRASS 5.7.

What is the solution ?

-- 
________________________________________________________________________
||      Lorenzo Moretti        e-mail: lorenzo.moretti at bologna.enea.it     
||/|/|  ENEA prot/idr          Web: http://wwwamb.bologna.enea.it/    
||   |  via Don Fiammelli, 2   FTP: ftp://ftpamb.bologna.enea.it/ (ris.)
~~~~~~  40128 BOLOGNA - ITALY  Ph: +39-0516098086  Fax: +39-0516098131
________________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20040628/4ce17740/attachment.html


More information about the Gdal-dev mailing list