[Gdal-dev] GDAL 1.2.1 Released - HDF error

Lorenzo Moretti lorenzo.moretti at bologna.enea.it
Tue Jun 29 05:32:37 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 error:

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

OUTPUT FROM 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)
.....

.....
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 FROM 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)
.....

.....
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 FROM 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
.....

.....
   INSTRUMENTSHORTNAME=ASTER
   WESTBOUNDINGCOORDINATE=12.049274
   NORTHBOUNDINGCOORDINATE=43.498844
   EASTBOUNDINGCOORDINATE=13.101212
   SOUTHBOUNDINGCOORDINATE=42.811432
   TIMEOFDAY=101254443000Z
.....

.....
   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 FROM GDAL 1.2.1

[lor:~] lor% 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/20040629/5106bb07/attachment.html


More information about the Gdal-dev mailing list