[gdal-dev] HDF-EOS AIRS CO2 images without georeference using
gdal_translate
David Ortiz
dvdov at yahoo.com
Sat Jan 28 22:59:55 EST 2012
Chaitanya,
i used gdalwarp with several values for tolerance and minimum_gcps respectively :
-refine_gcps 1 10, 1 35, 1 41, 200 10, 200 35, 200 41, 329 10, 329 35, 329 41, 9000 10, 9000 41
and loaded the images in Gis software with layer of points whose coordinates are from geolocation fields (Latitude, Longitude) in hdf file in order to compare
pixels against points.
when parameters are 1 41, 200 41, 329 41,9000 41, 9000 10 , most of points fall within its corresponding pixel. for other values, the images have a displacement towards west. Then,images with 1 10, 200 10, 329 10 values for parameters are overlapped as well as images with 1 35, 200 35, 329 35, and 1 41, 200 41, 329 41, 9000 10, 9000 41.
________________________________
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: Viernes, enero 27, 2012 11:09 P.M.
Asunto: Re: [gdal-dev] HDF-EOS AIRS CO2 images without georeference using gdal_translate
David,
gdalwarp should stop eliminating outliers when it can't find any more. But to be sure you can pass the minimum number of GCPs. Also, the argument tolerance is the tolerance in GCP's SRS units. Since the outliers are indicated by (-9999,-9999) and our GCPs can go between -180 and 180, anything between 360 and 9000 can be given as tolerance.
BTW, there is no need for -s_srs because we are using GCPs.
Do let us know how it goes.
On Sat, Jan 28, 2012 at 6:57 AM, David Ortiz <dvdov at yahoo.com> wrote:
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/20120128/eaa8ca57/attachment-0001.html
More information about the gdal-dev
mailing list