<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Chaitanya,</span></div><div><span><br></span></div><div><span>i used gdalwarp with several values for <i>tolerance</i> and <i>minimum_gcps </i><span>respectively</span> :</span></div><div><span>-refine_gcps 1 10, 1 35, 1 41, 200 10, 200 35, 200 41, 329 10, 329 35, 329 41, 9000 10, 9000 41 <br></span></div><div><span>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</span></div><div>pixels against points.</div><div><br></div><div>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 <span> are overlapped
as well as images with 1 35, 200 35, 329 35, and 1 41, 200 41, 329 41, 9000 10, 9000 41. </span> </div><div><br></div><div><span><br></span></div><div><span><br></span></div><div><span><br></span></div><div><span><br></span></div><div><span><br></span></div><div><br></div> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">De:</span></b> Chaitanya kumar CH <chaitanya.ch@gmail.com><br> <b><span style="font-weight: bold;">Para:</span></b> David Ortiz <dvdov@yahoo.com> <br><b><span style="font-weight: bold;">CC:</span></b> "gdal-dev@lists.osgeo.org" <gdal-dev@lists.osgeo.org> <br> <b><span style="font-weight:
bold;">Enviado:</span></b> Viernes, enero 27, 2012 11:09 P.M.<br> <b><span style="font-weight: bold;">Asunto:</span></b> Re: [gdal-dev] HDF-EOS AIRS CO2 images without georeference using gdal_translate<br> </font> </div> <br><div id="yiv679307760">David,<br><br>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 <i>tolerance</i> 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.<br>
<br>BTW, there is no need for -s_srs because we are using GCPs.<br><br>Do let us know how it goes.<br><br><div class="yiv679307760gmail_quote">On Sat, Jan 28, 2012 at 6:57 AM, David Ortiz <span dir="ltr"><<a rel="nofollow" ymailto="mailto:dvdov@yahoo.com" target="_blank" href="mailto:dvdov@yahoo.com">dvdov@yahoo.com</a>></span> wrote:<br>
<blockquote class="yiv679307760gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><div style="font-size:12pt;">
<span><span style="font-size: 13px; font-family: Arial; ">Chaitanya,</span><br></span></div><div><font face="Arial"><br></font></div><div><font face="Arial">This image have 329 GCPs and 41 of them are not outliers , can i put
<span style="font-size:16px;">-refine_gcps 329 41 </span></font><span style="font-size: 13px; font-family: Arial; ">in the command ?</span></div><div><span style="font-size: 13px; font-family: Arial; "><br>
</span></div><div><span style="font-size: 13px; font-family: Arial; "><br></span></div><div><span style="font-size: 13px; font-family: Arial; "><br></span></div><div><span style="font-size: 13px; font-family: Arial; ">--</span></div><div>
<span style="font-size: 13px; font-family: Arial; ">David A. Ortiz V</span></div><div style="font-size:12pt;"><br></div><div style="font-size:12pt;">
<br></div><div style="font-size:12pt;"> <div style="font-size:12pt;">
<div dir="ltr"> <font face="Arial"><div class="yiv679307760im"> <hr size="1"> <b><span style="font-weight:bold;">De:</span></b> Chaitanya kumar CH <<a rel="nofollow" ymailto="mailto:chaitanya.ch@gmail.com" target="_blank" href="mailto:chaitanya.ch@gmail.com">chaitanya.ch@gmail.com</a>><br>
<b><span style="font-weight:bold;">Para:</span></b> David Ortiz <<a rel="nofollow" ymailto="mailto:dvdov@yahoo.com" target="_blank" href="mailto:dvdov@yahoo.com">dvdov@yahoo.com</a>> <br><b><span style="font-weight:bold;">CC:</span></b> "<a rel="nofollow" ymailto="mailto:gdal-dev@lists.osgeo.org" target="_blank" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>" <<a rel="nofollow" ymailto="mailto:gdal-dev@lists.osgeo.org" target="_blank" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>> <br>
</div><b><span style="font-weight:bold;">Enviado:</span></b> Jueves, enero 26, 2012 10:49 P.M.<div class="yiv679307760im"><br> <b><span style="font-weight:bold;">Asunto:</span></b> Re: [gdal-dev] HDF-EOS AIRS CO2 images without georeference using
gdal_translate<br> </div></font> </div><div><div class="yiv679307760h5"> <br><div>David,<br><br>I checked the images I created now. The GCPs were not considered. So, I made sure they were used with gdalwarp.<br><span style="">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</span><br>
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.<br>
<br>Also note that the output image dimensions changed.<br><br><div>On Fri, Jan 27, 2012 at 7:26 AM, David Ortiz <span dir="ltr"><<a rel="nofollow" ymailto="mailto:dvdov@yahoo.com" target="_blank" href="mailto:dvdov@yahoo.com">dvdov@yahoo.com</a>></span> wrote:<br>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="font-size:12pt;"><div style="font-size:12pt;">
<span>Hi Chaitanya</span></div><div style="font-size:12pt;"><span><br></span></div><div style="font-size:12pt;">
<span style="font-size:12pt;"><br></span></div><div style="font-size:12pt;"><span style="font-size:12pt;">Applying </span><span style="font-size:12pt;">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 </span><font size="3">gvSIG allows see the </font>appropriate<font size="3"> values of CO2 amounts.</font></div><div style="font-size:12pt;">
<br></div><div style="font-size:12pt;">However, neither the .img nor GTiff have geographical spatial reference in WGS84 datum coordinates. Even opening subdatasets directly from hdf file <span style="font-size:12pt;">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:</span></div>
<div><div style="font-size:12pt;">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"]]<br>
</div></div><div style="font-size:12pt;"><span style="font-size:12pt;">Actually , when i load Geotiff generated with HEGTool </span><span style="font-size:12pt;">(with other AIRS products) </span><span style="font-size:12pt;">in any gis software , automatically have wgs84 Datum coordinates</span><br>
</div><div style="font-size:12pt;"><span style="font-size:12pt;"><br></span></div><div style="font-size:12pt;">
<span style="font-size:12pt;">Here the results of gdalinfo command:</span></div><div style="font-size:12pt;"><span style="font-size:12pt;">1. Input image</span><br>
</div><div><div><br></div><div>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 </div><div>Driver: HDF4Image/HDF4 Dataset</div>
<div><div> ...</div><div><div>Corner Coordinates:</div><div>Upper Left ( 0.0, 0.0)</div><div>Lower Left ( 0.0, 22.0)</div><div>Upper Right ( 15.0, 0.0)</div><div>Lower Right ( 15.0, 22.0)</div>
<div>Center ( 7.5, 11.0)</div><div>Band 1 Block=15x22 Type=Float32, ColorInterp=Gray</div></div><div> Min=379.197 Max=393.697 </div><div> Minimum=379.197, Maximum=393.697, Mean=386.463,
StdDev=3.071</div><div> NoData Value=-9999</div><div> Metadata:</div><div> STATISTICS_MAXIMUM=393.6969909668</div><div> STATISTICS_MEAN=386.46261742001</div><div> STATISTICS_MINIMUM=379.1969909668</div><div> STATISTICS_STDDEV=3.0709672735453</div>
<div><br></div><div>2. with Geotiff output image : </div><div><div>gdalinfo -stats /home/david/Descargas/pruebas/EOS/CO2_sup_Gtiff_EOS_traslate.tif</div><div>Driver: GTiff/GeoTIFF</div><div>Files: /home/david/Descargas/pruebas/EOS/CO2_sup_Gtiff_EOS_traslate.tif</div>
<div> /home/david/Descargas/pruebas/EOS/CO2_sup_Gtiff_EOS_traslate.tif.aux.xml</div><div><div>Size is 15, 22</div><div>Coordinate System is `'</div></div><div>GCP Projection = </div><div>GCP[ 0]: Id=1, Info=</div>
<div> (0.5,0.5) -> (-9999,-9999,0)</div><div>GCP[ 1]: Id=2,
Info=</div><div> (1.5,0.5) -> (-9999,-9999,0)</div><div>GCP[ 2]: Id=3, Info=</div><div> (2.5,0.5) -> (-9999,-9999,0)</div><div>GCP[ 3]: Id=4, Info=</div><div> (3.5,0.5) -> (-145.229995727539,23.3500003814697,0)</div>
<div>GCP[ 4]: Id=5, Info=</div><div> (4.5,0.5) -> (-9999,-9999,0)</div><div> ... </div><div><div>GROUP = HORIZONTALSPATIALDOMAINCONTAINER</div><div> GROUP = BOUNDINGRECTANGLE</div>
<div> OBJECT = EASTBOUNDINGCOORDINATE</div><div> NUM_VAL
= 1</div><div> VALUE = -133.537399291992</div><div> END_OBJECT = EASTBOUNDINGCOORDINATE</div><div> OBJECT = WESTBOUNDINGCOORDINATE</div><div> NUM_VAL = 1</div>
<div> VALUE = -157.941314697266</div><div> END_OBJECT = WESTBOUNDINGCOORDINATE</div><div> OBJECT = SOUTHBOUNDINGCOORDINATE</div><div> NUM_VAL
= 1</div><div> VALUE = 22.2317676544189</div><div> END_OBJECT = SOUTHBOUNDINGCOORDINATE</div><div> OBJECT = NORTHBOUNDINGCOORDINATE</div><div> NUM_VAL = 1</div>
<div> VALUE = 45.889762878418</div><div> END_OBJECT = NORTHBOUNDINGCOORDINATE</div><div> END_GROUP = BOUNDINGRECTANGLE</div><div> ... </div></div>
<div> INTERLEAVE=BAND</div><div><div>Corner
Coordinates:</div><div>Upper Left ( 0.0, 0.0)</div><div>Lower Left ( 0.0, 22.0)</div><div>Upper Right ( 15.0, 0.0)</div><div>Lower Right ( 15.0, 22.0)</div><div>Center ( 7.5, 11.0)</div><div>
Band 1 Block=15x22 Type=Float32, ColorInterp=Gray</div></div><div> Minimum=379.197, Maximum=393.697, Mean=386.463, StdDev=3.071</div><div> NoData Value=-9999</div><div> Metadata:</div><div> STATISTICS_MAXIMUM=393.6969909668</div>
<div> STATISTICS_MEAN=386.46261742001</div><div> STATISTICS_MINIMUM=379.1969909668</div><div> STATISTICS_STDDEV=3.0709672735453</div><div> </div><div>3. .img image :</div><div><br></div><div>gdalinfo -stats /home/david/Descargas/pruebas/EOS/CO2_sup_img_EOS.img</div>
<div>Driver: HFA/Erdas Imagine
Images (.img)</div><div>Files: /home/david/Descargas/pruebas/EOS/CO2_sup_img_EOS.img</div><div> /home/david/Descargas/pruebas/EOS/CO2_sup_img_EOS.img.aux.xml</div><div><div>Size is 15, 22</div><div>Coordinate System is `'</div>
<div> ... </div></div><div><div>GROUP = SPATIALDOMAINCONTAINER</div><div> GROUP = HORIZONTALSPATIALDOMAINCONTAINER</div><div> GROUP = BOUNDINGRECTANGLE</div>
<div> OBJECT = EASTBOUNDINGCOORDINATE</div><div> NUM_VAL = 1</div><div> VALUE
= -133.537399291992</div><div> END_OBJECT = EASTBOUNDINGCOORDINATE</div><div> OBJECT = WESTBOUNDINGCOORDINATE</div><div> NUM_VAL = 1</div><div> VALUE = -157.941314697266</div>
<div> END_OBJECT = WESTBOUNDINGCOORDINATE</div><div> OBJECT = SOUTHBOUNDINGCOORDINATE</div><div> NUM_VAL = 1</div><div> VALUE
= 22.2317676544189</div><div> END_OBJECT = SOUTHBOUNDINGCOORDINATE</div><div> OBJECT = NORTHBOUNDINGCOORDINATE</div><div> NUM_VAL = 1</div><div> VALUE = 45.889762878418</div>
<div> END_OBJECT = NORTHBOUNDINGCOORDINATE</div><div> END_GROUP = BOUNDINGRECTANGLE</div><div> ... </div></div><div><div>Corner Coordinates:</div><div>Upper Left ( 0.0, 0.0)</div>
<div>Lower Left ( 0.0,
22.0)</div><div>Upper Right ( 15.0, 0.0)</div><div>Lower Right ( 15.0, 22.0)</div><div>Center ( 7.5, 11.0)</div></div><div>Band 1 Block=64x64 Type=Float32, ColorInterp=Undefined</div><div> Description = Layer_1</div>
<div> Minimum=379.197, Maximum=393.697, Mean=386.463, StdDev=3.071</div><div> NoData Value=-9999</div><div> Metadata:</div><div> LAYER_TYPE=athematic</div><div> STATISTICS_MAXIMUM=393.6969909668</div><div> STATISTICS_MEAN=386.46261742001</div>
<div> STATISTICS_MINIMUM=379.1969909668</div><div> STATISTICS_STDDEV=3.0709672735453</div><div><br></div><div><br></div><div><br></div><div>What is wrong?. I tried with gdal 1.8 and 1.9 with hdf4 support.</div><div>
<br></div><div><br></div><div>Best regards.</div></div></div></div><span><font color="#888888"><div style="font-size:12pt;">--</div><div style="font-size:12pt;">
<br></div><div style="font-size:12pt;">David Ortiz V.</div></font></span><div style="font-size:12pt;">
<br></div></div></div></blockquote></div><br>
</div> </div></div></div> </div> </div></div></blockquote></div><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br><br>+91-9494447584<br>17.2416N 80.1426E<br>
</div><br><br> </div> </div> </div></body></html>