[gdal-dev] HDF-EOS AIRS CO2 images without georeference using gdal_translate

David Ortiz dvdov at yahoo.com
Fri Jan 27 20:27:49 EST 2012


Chaitanya,


This image have 329 GCPs and 41 of them are not outliers , can i put -refine_gcps 329 41 in the command ?



--
David A. Ortiz V







________________________________
 De: Chaitanya kumar CH <chaitanya.ch at gmail.com>
Para: David Ortiz <dvdov at yahoo.com> 
CC: "gdal-dev at lists.osgeo.org" <gdal-dev at lists.osgeo.org> 
Enviado: Jueves, enero 26, 2012 10:49 P.M.
Asunto: Re: [gdal-dev] HDF-EOS AIRS CO2 images without georeference using gdal_translate
 

David,

I checked the images I created now. The GCPs were not considered. So, I made sure they were used with gdalwarp.
gdalwarp -s_srs "EPSG:4326" -t_srs "EPSG:4326" -refine_gcps 200 10 -of GTiff HDF4_EOS:EOS_SWATH:"AIRS.2008.03.12.228.L2.CO2_Sup.v5.4.11.0.CO2.T09254115637.hdf":CO2:CO2ret  CO2_sup_Gtiff_EOS_warp.tif
I used the -refine_gcps. It will help in excluding the dummy gcps 
pointing to (-9999,-9999,0). In this option, the number of minimum_gcps 
had to be given. I chose the number 10 based on the number of usable 
GCPs available. It should not be more than the number of usable GCPs. If I did not exclude the dummy gcps, I got black image.

Also note that the output image dimensions changed.


On Fri, Jan 27, 2012 at 7:26 AM, David Ortiz <dvdov at yahoo.com> wrote:

Hi Chaitanya
>
>
>
>
>Applying gdalinfo -stats to input and output images i get coherent values  for statistics in both .img  and GTiff  images. The problem was in data display in GIS since QGIS show a Gtiff image with all pixel values equal to zero when i use "identify spatial objects" tool and ArcGIS  doesn't display it correctly , just two lines and no data, but gvSIG  allows see the appropriate values of CO2 amounts.
>
>
>However, neither the .img nor GTiff have geographical spatial reference in WGS84 datum coordinates. Even opening  subdatasets directly from hdf file with ArcGis , the images are missing georeference. As it is seen below, hdf image is between -133.57, -157.94 longitudes and 22.23, 45.88 latitudes. I mentioned HDF_SDS:UNKNOWN datasets on previous post because it have some info about coordinate reference system:
>SRS=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"]],AUTHORITY["EPSG","4326"]]
>
>Actually , when i load Geotiff generated with HEGTool (with other AIRS products) in any gis software , automatically have wgs84 Datum coordinates
>
>
>
>Here the results of gdalinfo command:
>1. Input image
>
>
>
>gdalinfo -stats HDF4_EOS:EOS_SWATH:"/home/david/Descargas/pruebas/AIRS.2008.03.12.228.L2.CO2_Sup.v5.4.11.0.CO2.T09254115637.hdf":CO2:CO2ret 
>Driver: HDF4Image/HDF4 Dataset
>                   ...
>Corner Coordinates:
>Upper Left  (    0.0,    0.0)
>Lower Left  (    0.0,   22.0)
>Upper Right (   15.0,    0.0)
>Lower Right (   15.0,   22.0)
>Center      (    7.5,   11.0)
>Band 1 Block=15x22 Type=Float32, ColorInterp=Gray
>  Min=379.197 Max=393.697 
>  Minimum=379.197, Maximum=393.697, Mean=386.463, StdDev=3.071
>  NoData Value=-9999
>  Metadata:
>    STATISTICS_MAXIMUM=393.6969909668
>    STATISTICS_MEAN=386.46261742001
>    STATISTICS_MINIMUM=379.1969909668
>    STATISTICS_STDDEV=3.0709672735453
>
>
>2.  with Geotiff output  image : 
>gdalinfo -stats  /home/david/Descargas/pruebas/EOS/CO2_sup_Gtiff_EOS_traslate.tif
>Driver: GTiff/GeoTIFF
>Files: /home/david/Descargas/pruebas/EOS/CO2_sup_Gtiff_EOS_traslate.tif
>       /home/david/Descargas/pruebas/EOS/CO2_sup_Gtiff_EOS_traslate.tif.aux.xml
>Size is 15, 22
>Coordinate System is `'
>GCP Projection = 
>GCP[  0]: Id=1, Info=
>          (0.5,0.5) -> (-9999,-9999,0)
>GCP[  1]: Id=2, Info=
>          (1.5,0.5) -> (-9999,-9999,0)
>GCP[  2]: Id=3, Info=
>          (2.5,0.5) -> (-9999,-9999,0)
>GCP[  3]: Id=4, Info=
>          (3.5,0.5) -> (-145.229995727539,23.3500003814697,0)
>GCP[  4]: Id=5, Info=
>          (4.5,0.5) -> (-9999,-9999,0)
>               ... 
>GROUP                  = HORIZONTALSPATIALDOMAINCONTAINER
>      GROUP                  = BOUNDINGRECTANGLE
>        OBJECT                 = EASTBOUNDINGCOORDINATE
>          NUM_VAL              = 1
>          VALUE                = -133.537399291992
>        END_OBJECT             = EASTBOUNDINGCOORDINATE
>        OBJECT                 = WESTBOUNDINGCOORDINATE
>          NUM_VAL              = 1
>          VALUE                = -157.941314697266
>        END_OBJECT             = WESTBOUNDINGCOORDINATE
>        OBJECT                 = SOUTHBOUNDINGCOORDINATE
>          NUM_VAL              = 1
>          VALUE                = 22.2317676544189
>        END_OBJECT             = SOUTHBOUNDINGCOORDINATE
>        OBJECT                 = NORTHBOUNDINGCOORDINATE
>          NUM_VAL              = 1
>          VALUE                = 45.889762878418
>        END_OBJECT             = NORTHBOUNDINGCOORDINATE
>      END_GROUP              = BOUNDINGRECTANGLE
>               ... 
>  INTERLEAVE=BAND
>Corner Coordinates:
>Upper Left  (    0.0,    0.0)
>Lower Left  (    0.0,   22.0)
>Upper Right (   15.0,    0.0)
>Lower Right (   15.0,   22.0)
>Center      (    7.5,   11.0)
>Band 1 Block=15x22 Type=Float32, ColorInterp=Gray
>  Minimum=379.197, Maximum=393.697, Mean=386.463, StdDev=3.071
>  NoData Value=-9999
>  Metadata:
>    STATISTICS_MAXIMUM=393.6969909668
>    STATISTICS_MEAN=386.46261742001
>    STATISTICS_MINIMUM=379.1969909668
>    STATISTICS_STDDEV=3.0709672735453
>              
>3. .img image :
>
>
>gdalinfo -stats /home/david/Descargas/pruebas/EOS/CO2_sup_img_EOS.img
>Driver: HFA/Erdas Imagine Images (.img)
>Files: /home/david/Descargas/pruebas/EOS/CO2_sup_img_EOS.img
>       /home/david/Descargas/pruebas/EOS/CO2_sup_img_EOS.img.aux.xml
>Size is 15, 22
>Coordinate System is `'
>               ... 
>GROUP                  = SPATIALDOMAINCONTAINER
>    GROUP                  = HORIZONTALSPATIALDOMAINCONTAINER
>      GROUP                  = BOUNDINGRECTANGLE
>        OBJECT                 = EASTBOUNDINGCOORDINATE
>          NUM_VAL              = 1
>          VALUE                = -133.537399291992
>        END_OBJECT             = EASTBOUNDINGCOORDINATE
>        OBJECT                 = WESTBOUNDINGCOORDINATE
>          NUM_VAL              = 1
>          VALUE                = -157.941314697266
>        END_OBJECT             = WESTBOUNDINGCOORDINATE
>        OBJECT                 = SOUTHBOUNDINGCOORDINATE
>          NUM_VAL              = 1
>          VALUE                = 22.2317676544189
>        END_OBJECT             = SOUTHBOUNDINGCOORDINATE
>        OBJECT                 = NORTHBOUNDINGCOORDINATE
>          NUM_VAL              = 1
>          VALUE                = 45.889762878418
>        END_OBJECT             = NORTHBOUNDINGCOORDINATE
>      END_GROUP              = BOUNDINGRECTANGLE
>               ... 
>Corner Coordinates:
>Upper Left  (    0.0,    0.0)
>Lower Left  (    0.0,   22.0)
>Upper Right (   15.0,    0.0)
>Lower Right (   15.0,   22.0)
>Center      (    7.5,   11.0)
>Band 1 Block=64x64 Type=Float32, ColorInterp=Undefined
>  Description = Layer_1
>  Minimum=379.197, Maximum=393.697, Mean=386.463, StdDev=3.071
>  NoData Value=-9999
>  Metadata:
>    LAYER_TYPE=athematic
>    STATISTICS_MAXIMUM=393.6969909668
>    STATISTICS_MEAN=386.46261742001
>    STATISTICS_MINIMUM=379.1969909668
>    STATISTICS_STDDEV=3.0709672735453
>
>
>
>
>
>
>What is wrong?. I tried with gdal 1.8 and 1.9 with hdf4 support.
>
>
>
>
>Best regards.--
>
>
>David Ortiz V.
>
>
-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120127/f757421b/attachment-0001.html


More information about the gdal-dev mailing list