<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span><span style="font-family: Arial; font-size: 13px; ">Chaitanya,</span><br></span></div><div><font face="Arial" size="2"><br></font></div><div><font face="Arial" size="2">This image have 329 GCPs and 41 of them are not outliers , can i put&nbsp;
<span style="font-family: 'courier new', monospace; font-size: 16px; ">-refine_gcps 329 41 </span></font><span style="font-family: Arial; font-size: 13px; ">in the command ?</span></div><div><span style="font-family: Arial; font-size: 13px; "><br></span></div><div><span style="font-family: Arial; font-size: 13px; "><br></span></div><div><span style="font-family: Arial; font-size: 13px; "><br></span></div><div><span style="font-family: Arial; font-size: 13px; ">--</span></div><div><span style="font-family: Arial; font-size: 13px; ">David A. Ortiz V</span></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div
 style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><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 &lt;chaitanya.ch@gmail.com&gt;<br> <b><span style="font-weight: bold;">Para:</span></b> David Ortiz &lt;dvdov@yahoo.com&gt; <br><b><span style="font-weight: bold;">CC:</span></b> "gdal-dev@lists.osgeo.org" &lt;gdal-dev@lists.osgeo.org&gt; <br> <b><span style="font-weight: bold;">Enviado:</span></b> Jueves, enero 26, 2012 10:49 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="yiv1979723207">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="font-family: 'courier new', monospace; ">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&nbsp; 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 class="yiv1979723207gmail_quote">On Fri, Jan 27, 2012 at 7:26 AM, David Ortiz <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:dvdov@yahoo.com" target="_blank" href="mailto:dvdov@yahoo.com">dvdov@yahoo.com</a>&gt;</span> wrote:<br>
<blockquote class="yiv1979723207gmail_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>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&nbsp;</span><span style="font-size:12pt;">gdalinfo -stats to input and output images i get coherent values &nbsp;for statistics in both .img &nbsp;and GTiff &nbsp;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
 &nbsp;doesn't display it correctly , just two lines and no data, but&nbsp;</span><font size="3">gvSIG &nbsp;allows see the&nbsp;</font>appropriate<font size="3">&nbsp;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 &nbsp;subdatasets directly&nbsp;from hdf file&nbsp;<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 class="yiv1979723207im"><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&nbsp;</span><span style="font-size:12pt;">(with other AIRS products)&nbsp;</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&nbsp;</div><div>Driver: HDF4Image/HDF4 Dataset</div>
<div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;...</div><div class="yiv1979723207im"><div>Corner Coordinates:</div><div>Upper Left &nbsp;( &nbsp; &nbsp;0.0, &nbsp; &nbsp;0.0)</div><div>Lower Left &nbsp;( &nbsp; &nbsp;0.0, &nbsp; 22.0)</div><div>Upper Right ( &nbsp; 15.0, &nbsp; &nbsp;0.0)</div><div>Lower Right ( &nbsp; 15.0, &nbsp; 22.0)</div>
<div>Center &nbsp; &nbsp; &nbsp;( &nbsp; &nbsp;7.5, &nbsp; 11.0)</div><div>Band 1 Block=15x22 Type=Float32, ColorInterp=Gray</div></div><div>&nbsp; Min=379.197 Max=393.697&nbsp;</div><div>&nbsp; Minimum=379.197, Maximum=393.697, Mean=386.463,
 StdDev=3.071</div><div>&nbsp; NoData Value=-9999</div><div>&nbsp; Metadata:</div><div>&nbsp; &nbsp; STATISTICS_MAXIMUM=393.6969909668</div><div>&nbsp; &nbsp; STATISTICS_MEAN=386.46261742001</div><div>&nbsp; &nbsp; STATISTICS_MINIMUM=379.1969909668</div><div>&nbsp; &nbsp; STATISTICS_STDDEV=3.0709672735453</div>
<div><br></div><div>2. &nbsp;with&nbsp;Geotiff&nbsp;output &nbsp;image :&nbsp;</div><div><div>gdalinfo -stats &nbsp;/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>&nbsp; &nbsp; &nbsp; &nbsp;/home/david/Descargas/pruebas/EOS/CO2_sup_Gtiff_EOS_traslate.tif.aux.xml</div><div class="yiv1979723207im"><div>Size is 15, 22</div><div>Coordinate System is `'</div></div><div>GCP Projection =&nbsp;</div><div>GCP[ &nbsp;0]: Id=1, Info=</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (0.5,0.5) -&gt; (-9999,-9999,0)</div><div>GCP[ &nbsp;1]: Id=2,
 Info=</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (1.5,0.5) -&gt; (-9999,-9999,0)</div><div>GCP[ &nbsp;2]: Id=3, Info=</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (2.5,0.5) -&gt; (-9999,-9999,0)</div><div>GCP[ &nbsp;3]: Id=4, Info=</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (3.5,0.5) -&gt; (-145.229995727539,23.3500003814697,0)</div>
<div>GCP[ &nbsp;4]: Id=5, Info=</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (4.5,0.5) -&gt; (-9999,-9999,0)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;...&nbsp;</div><div class="yiv1979723207im"><div>GROUP &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= HORIZONTALSPATIALDOMAINCONTAINER</div><div>&nbsp; &nbsp; &nbsp; GROUP &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= BOUNDINGRECTANGLE</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; OBJECT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = EASTBOUNDINGCOORDINATE</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NUM_VAL &nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp;= 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VALUE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= -133.537399291992</div><div>&nbsp; &nbsp; &nbsp; &nbsp; END_OBJECT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = EASTBOUNDINGCOORDINATE</div><div>&nbsp; &nbsp; &nbsp; &nbsp; OBJECT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = WESTBOUNDINGCOORDINATE</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NUM_VAL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 1</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VALUE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= -157.941314697266</div><div>&nbsp; &nbsp; &nbsp; &nbsp; END_OBJECT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = WESTBOUNDINGCOORDINATE</div><div>&nbsp; &nbsp; &nbsp; &nbsp; OBJECT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = SOUTHBOUNDINGCOORDINATE</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NUM_VAL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp;= 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VALUE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 22.2317676544189</div><div>&nbsp; &nbsp; &nbsp; &nbsp; END_OBJECT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = SOUTHBOUNDINGCOORDINATE</div><div>&nbsp; &nbsp; &nbsp; &nbsp; OBJECT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = NORTHBOUNDINGCOORDINATE</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NUM_VAL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 1</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VALUE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 45.889762878418</div><div>&nbsp; &nbsp; &nbsp; &nbsp; END_OBJECT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = NORTHBOUNDINGCOORDINATE</div><div>&nbsp; &nbsp; &nbsp; END_GROUP &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= BOUNDINGRECTANGLE</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;...&nbsp;</div></div>
<div>&nbsp; INTERLEAVE=BAND</div><div class="yiv1979723207im"><div>Corner
 Coordinates:</div><div>Upper Left &nbsp;( &nbsp; &nbsp;0.0, &nbsp; &nbsp;0.0)</div><div>Lower Left &nbsp;( &nbsp; &nbsp;0.0, &nbsp; 22.0)</div><div>Upper Right ( &nbsp; 15.0, &nbsp; &nbsp;0.0)</div><div>Lower Right ( &nbsp; 15.0, &nbsp; 22.0)</div><div>Center &nbsp; &nbsp; &nbsp;( &nbsp; &nbsp;7.5, &nbsp; 11.0)</div><div>
Band 1 Block=15x22 Type=Float32, ColorInterp=Gray</div></div><div>&nbsp; Minimum=379.197, Maximum=393.697, Mean=386.463, StdDev=3.071</div><div>&nbsp; NoData Value=-9999</div><div>&nbsp; Metadata:</div><div>&nbsp; &nbsp; STATISTICS_MAXIMUM=393.6969909668</div>
<div>&nbsp; &nbsp; STATISTICS_MEAN=386.46261742001</div><div>&nbsp; &nbsp; STATISTICS_MINIMUM=379.1969909668</div><div>&nbsp; &nbsp; STATISTICS_STDDEV=3.0709672735453</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</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>&nbsp; &nbsp; &nbsp; &nbsp;/home/david/Descargas/pruebas/EOS/CO2_sup_img_EOS.img.aux.xml</div><div class="yiv1979723207im"><div>Size is 15, 22</div><div>Coordinate System is `'</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;...&nbsp;</div></div><div class="yiv1979723207im"><div>GROUP &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= SPATIALDOMAINCONTAINER</div><div>&nbsp; &nbsp; GROUP &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= HORIZONTALSPATIALDOMAINCONTAINER</div><div>&nbsp; &nbsp; &nbsp; GROUP &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= BOUNDINGRECTANGLE</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; OBJECT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = EASTBOUNDINGCOORDINATE</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NUM_VAL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VALUE &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= -133.537399291992</div><div>&nbsp; &nbsp; &nbsp; &nbsp; END_OBJECT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = EASTBOUNDINGCOORDINATE</div><div>&nbsp; &nbsp; &nbsp; &nbsp; OBJECT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = WESTBOUNDINGCOORDINATE</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NUM_VAL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VALUE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= -157.941314697266</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; END_OBJECT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = WESTBOUNDINGCOORDINATE</div><div>&nbsp; &nbsp; &nbsp; &nbsp; OBJECT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = SOUTHBOUNDINGCOORDINATE</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NUM_VAL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VALUE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp;= 22.2317676544189</div><div>&nbsp; &nbsp; &nbsp; &nbsp; END_OBJECT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = SOUTHBOUNDINGCOORDINATE</div><div>&nbsp; &nbsp; &nbsp; &nbsp; OBJECT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = NORTHBOUNDINGCOORDINATE</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NUM_VAL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 1</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VALUE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 45.889762878418</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; END_OBJECT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = NORTHBOUNDINGCOORDINATE</div><div>&nbsp; &nbsp; &nbsp; END_GROUP &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= BOUNDINGRECTANGLE</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;...&nbsp;</div></div><div class="yiv1979723207im"><div>Corner Coordinates:</div><div>Upper Left &nbsp;( &nbsp; &nbsp;0.0, &nbsp; &nbsp;0.0)</div>
<div>Lower Left &nbsp;( &nbsp; &nbsp;0.0, &nbsp;
 22.0)</div><div>Upper Right ( &nbsp; 15.0, &nbsp; &nbsp;0.0)</div><div>Lower Right ( &nbsp; 15.0, &nbsp; 22.0)</div><div>Center &nbsp; &nbsp; &nbsp;( &nbsp; &nbsp;7.5, &nbsp; 11.0)</div></div><div>Band 1 Block=64x64 Type=Float32, ColorInterp=Undefined</div><div>&nbsp; Description = Layer_1</div>
<div>&nbsp; Minimum=379.197, Maximum=393.697, Mean=386.463, StdDev=3.071</div><div>&nbsp; NoData Value=-9999</div><div>&nbsp; Metadata:</div><div>&nbsp; &nbsp; LAYER_TYPE=athematic</div><div>&nbsp; &nbsp; STATISTICS_MAXIMUM=393.6969909668</div><div>&nbsp; &nbsp; STATISTICS_MEAN=386.46261742001</div>
<div>&nbsp; &nbsp; STATISTICS_MINIMUM=379.1969909668</div><div>&nbsp; &nbsp; 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 class="yiv1979723207HOEnZb"><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>-- <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>