<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
<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 <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> 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 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"><<a rel="nofollow" ymailto="mailto:dvdov@yahoo.com" target="_blank" href="mailto:dvdov@yahoo.com">dvdov@yahoo.com</a>></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 </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 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 </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 class="yiv1979723207im"><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 class="yiv1979723207im"><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 class="yiv1979723207im"><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 class="yiv1979723207im"><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 class="yiv1979723207im"><div>Size is 15, 22</div><div>Coordinate System is `'</div>
<div> ... </div></div><div class="yiv1979723207im"><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 class="yiv1979723207im"><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 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>