----- Mensaje reenviado -----
De: David Ortiz <dv...@yahoo.com>
Para: "chaitanya...@gmail.com" <chaitanya...@gmail.com>
Enviado: Miércoles, febrero 8, 2012 12:12 A.M.
Asunto: Re: [gdal-dev] HDF-EOS AIRS CO2 images without georeference using
gdal_translate
Hi Chaitanya,
I have some questions:
1. Is there some way to get the residuals or errors from georeferencing when i
use gdalwarp with any image?
2. Currently , i have a particular Geotiff image without spatial reference but
i know it has the same features of AIRS radiances product (AIRIBRAD product
from http://mirador.gsfc.nasa.gov/cgi-bin/mirador/homepageAlt.pl?keyword=AIRIBRAD
for 2009.01.18. date) like coordinate system,resolution etc, but with
other values for each pixel. I want set geolocation information to Geotiff from
radiances file so,
Is posible associate geolocation arrays from hdf file (latitude,longitude
subdatasets) with pixels of Geotiff image without using "-gcp" or
"--optfile"options?
may be extracting arrays to GeoTiff format first?
3. I tried the command:
gdal_translate -a_srs "EPSG:4326" --optfile GCPs.txt inputfile.tif
outputfile.tif, then
gdalwarp outputfile.tif outputfile_1.if
where GCPs.txt file has 12200 gcps. I get:
Input file size is 90, 135
0ERROR 1: TIFFFetchNormalTag:Incorrect count for "GeoTiePoints";
tag ignored
...10...20...30...40...50...60...70...80...90...100 - done.
it worked with 10800 gcps.
Is there a limit number of gcps ??
4. Image with 10800 gcps does not have the same size of radiances image
provided by HEG tool (Geotiff) when both are loaded into GIS software.
Do you know why ?
Below i describe some lines of AIRS radiances and particular geotiff images:
gdalinfo
HDF4_EOS:EOS_SWATH:"/home/david/Descargas/2009.01.18/HDFs/AIRS.2009.01.18.236.L1B.AIRS_Rad.v5.0.0.0.G09020142509.hdf":L1B_AIRS_Science:radiances
SWATH_TITLE= =L1B_AIRS_Science
...
...
Geolocation:
LINE_OFFSET=0
LINE_STEP=1
PIXEL_OFFSET=0
PIXEL_STEP=1
SRS=
X_BAND=1
X_DATASET=HDF4_EOS:EOS_SWATH_GEOL:"/home/david/Descargas/2009.01.18/HDFs/AIRS.2009.01.18.236.L1B.AIRS_Rad.v5.0.0.0.G09020142509.hdf":L1B_AIRS_Science:Longitude
Y_BAND=1
Y_DATASET=HDF4_EOS:EOS_SWATH_GEOL:"/home/david/Descargas/2009.01.18/HDFs/AIRS.2009.01.18.236.L1B.AIRS_Rad.v5.0.0.0.G09020142509.hdf":L1B_AIRS_Science:Latitude
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 90.0)
Upper Right ( 2378.0, 0.0)
Lower Right ( 2378.0, 90.0)
Center ( 1189.0, 45.0)
--- Here i note the dimensions are wrong because radiances is a dataset with
135*90 pixels and 2378 bands
gdalinfo
HDF4_SDS:UNKNOWN:"/home/david/Descargas/2009.01.18/HDFs/AIRS.2009.01.18.236.L1B.AIRS_Rad.v5.0.0.0.G09020142509.hdf":3
(radiances)
...
...
Geolocation:
LINE_OFFSET=0
LINE_STEP=1
PIXEL_OFFSET=0
PIXEL_STEP=1
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"]]
X_BAND=1
X_DATASET=HDF4_SDS:UNKNOWN:"/home/david/Descargas/2009.01.18/HDFs/AIRS.2009.01.18.236.L1B.AIRS_Rad.v5.0.0.0.G09020142509.hdf":1
Y_BAND=1
Y_DATASET=HDF4_SDS:UNKNOWN:"/home/david/Descargas/2009.01.18/HDFs/AIRS.2009.01.18.236.L1B.AIRS_Rad.v5.0.0.0.G09020142509.hdf":0
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 90.0)
Upper Right ( 2378.0, 0.0)
Lower Right ( 2378.0, 90.0)
Center ( 1189.0, 45.0)
# gdalinfo
/home/david/Descargas/2009.01.18/Sin_referencia/Airs_referencia/GCPs/CO2_particularGTiff_2009.01.18.tif
Driver: GTiff/GeoTIFF
Files:
/home/david/Descargas/2009.01.18/Sin_referencia/uwairs_Airs_referencia/GCPs/CO2_particularGTiff_2009.01.18.tif
Size is 90, 135
Coordinate System is `'
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 135.0)
Upper Right ( 90.0, 0.0)
Lower Right ( 90.0, 135.0)
Center ( 45.0, 67.5)
Band 1 Block=90x22 Type=Float32, ColorInterp=Gray
Thanks in advance
Best Regards
David A. Ortiz V
________________________________
De: David Ortiz <dv...@yahoo.com>
Para: Chaitanya kumar CH <chaitanya...@gmail.com>
CC: "gdal-dev@lists.osgeo.org" <gdal-dev@lists.osgeo.org>
Enviado: Sábado, enero 28, 2012 10:59 P.M.
Asunto: Re: [gdal-dev] HDF-EOS AIRS CO2 images without georeference using
gdal_translate
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...@gmail.com>
Para: David Ortiz <dv...@yahoo.com>
CC: "gdal-dev@lists.osgeo.org" <gdal-dev@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 <dv...@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...@gmail.com>
>Para: David Ortiz <dv...@yahoo.com>
>CC: "gdal-dev@lists.osgeo.org" <gdal-dev@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 <dv...@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
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev