[gdal-dev] gdalinfo doesn't show GEOS projection info

2011-04-12 Thread kingkastle
Greetings,

I'm working with hdf5 file  with the following attributes:

(obtained with hdfview)
http://osgeo-org.1803224.n2.nabble.com/file/n6265339/hdf5view.bmp 

However, when I gdalinfo the file, I get the following information:
Driver: HDF5Image/HDF5 Dataset
Files: none associated
Size is 1701, 651
Coordinate System is:
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]]
Corner Coordinates:
Upper Left  (0.0,0.0)
Lower Left  (0.0,  651.0)
Upper Right ( 1701.0,0.0)
Lower Right ( 1701.0,  651.0)
Center  (  850.5,  325.5)
Band 1 Block=1701x1 Type=Int16, ColorInterp=Undefined
 Metadata:
   DSSF:CLASS=Data
   DSSF:PRODUCT=DSSF
   DSSF:PRODUCT_ID=111
   DSSF:N_COLS=1701
   DSSF:N_LINES=651
   DSSF:NB_BYTES=2
   DSSF:SCALING_FACTOR=10
   DSSF:OFFSET=0
   DSSF:MISSING_VALUE=-1
   DSSF:UNITS=W/m**2
   DSSF:CAL_SLOPE=1
   DSSF:CAL_OFFSET=0

So, basically I can't see in the gdalinfo the following information:

+) Proyection used
+) Origin
+) Pixel size

In fact, when I do gdal-translate the file created is not georeferenced
rightly.

In my opinion, the problem is that the hdf5 attributes are imcomplete or not
rightly defined, 

Please let me know your opinion

Many thanks in advance and best regards,

Rafa


--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/gdalinfo-doesn-t-show-GEOS-projection-info-tp6265339p6265339.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] gdalinfo doesn't show GEOS projection info

2011-04-12 Thread Frank Warmerdam

On 11-04-12 10:24 AM, kingkastle wrote:

Greetings,

I'm working with hdf5 file  with the following attributes:

(obtained with hdfview)
http://osgeo-org.1803224.n2.nabble.com/file/n6265339/hdf5view.bmp

However, when I gdalinfo the file, I get the following information:
Driver: HDF5Image/HDF5 Dataset
Files: none associated
Size is 1701, 651
Coordinate System is:
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]]
Corner Coordinates:
Upper Left  (0.0,0.0)
Lower Left  (0.0,  651.0)
Upper Right ( 1701.0,0.0)
Lower Right ( 1701.0,  651.0)
Center  (  850.5,  325.5)

...

So, basically I can't see in the gdalinfo the following information:

+) Proyection used
+) Origin
+) Pixel size

In fact, when I do gdal-translate the file created is not georeferenced
rightly.

In my opinion, the problem is that the hdf5 attributes are imcomplete or not
rightly defined,

Please let me know your opinion

Many thanks in advance and best regards,


Rafa,

One challenge with HDF5 (and HDF4) products is that coordinate system
and other georeferencing metadata may be included in a wide variety of
forms.  This aspect is not well standardized - or at least the standards
that exist are often not followed.  So, in this case, GDAL is not able
to deduce the coordinate system or geotransform.  It seems like there
*might* be enough metadata available to construct coordinate system
information for this dataset but it would likely require a fair amount
of fooling around to implement and verify.

If the data is public you might want to file a GDAL ticket with a pointer
to the dataset and the metadata report along with a request to support
this georeferencing format.  But I must confess I am unlikely to work
on it unless I have client interest.

Best regards,
--
---+--
I set the clouds in motion - turn up   | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush| Geospatial Programmer for Rent

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] gdalinfo doesn't show GEOS projection info

2011-04-12 Thread Ricardo Filipe Soares Garcia da
Hi Rafa

According to my research on this matter, these HDF5 files (from
LANDSAF, I presume) are not georeferenced in a way that GDAL can
recognize.

There is in fact some information regarding the coordinate system in
the HDF5 file, but it is stored on the metadata of the root of the
HDF5 file, which is something that GDAL can't read (at least my 1.7.3
version can't). The solution I have found for this is to use some
other program (in my case, the pytables python module) to extract this
information.
After having this info it is still necessary to add some GCPs to the
files, in order to georeference them (still with the GEOS projection)
in a way that is understandable by GDAL. In order to obtain the
coordinates of the GCPs, I am using some reference formulas from the
LANDSAF PUMs, which will convert from pixel coordinate to latlon and
then proj4's cs2cs utility to convert them to the GEOS projection.
Finally I use the gdal_translate utility to add the GCPs to the file.

In the end, a gdalwarp can be used to reproject the file from GEOS
projection to another projection.

This is basically what I am doing in the script that I sent you
(off-list). If someone has another technique for georeferencing
LANDSAF HDF5 files I'd also be very interesetd in it ;)

Best regards


On Tue, Apr 12, 2011 at 3:24 PM, kingkastle kingkastle4...@gmail.com wrote:
 Greetings,

 I'm working with hdf5 file  with the following attributes:

 (obtained with hdfview)
 http://osgeo-org.1803224.n2.nabble.com/file/n6265339/hdf5view.bmp

 However, when I gdalinfo the file, I get the following information:
 Driver: HDF5Image/HDF5 Dataset
 Files: none associated
 Size is 1701, 651
 Coordinate System is:
 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]]
 Corner Coordinates:
 Upper Left  (    0.0,    0.0)
 Lower Left  (    0.0,  651.0)
 Upper Right ( 1701.0,    0.0)
 Lower Right ( 1701.0,  651.0)
 Center      (  850.5,  325.5)
 Band 1 Block=1701x1 Type=Int16, ColorInterp=Undefined
  Metadata:
   DSSF:CLASS=Data
   DSSF:PRODUCT=DSSF
   DSSF:PRODUCT_ID=111
   DSSF:N_COLS=1701
   DSSF:N_LINES=651
   DSSF:NB_BYTES=2
   DSSF:SCALING_FACTOR=10
   DSSF:OFFSET=0
   DSSF:MISSING_VALUE=-1
   DSSF:UNITS=W/m**2
   DSSF:CAL_SLOPE=1
   DSSF:CAL_OFFSET=0

 So, basically I can't see in the gdalinfo the following information:

 +) Proyection used
 +) Origin
 +) Pixel size

 In fact, when I do gdal-translate the file created is not georeferenced
 rightly.

 In my opinion, the problem is that the hdf5 attributes are imcomplete or not
 rightly defined,

 Please let me know your opinion

 Many thanks in advance and best regards,

 Rafa


 --
 View this message in context: 
 http://osgeo-org.1803224.n2.nabble.com/gdalinfo-doesn-t-show-GEOS-projection-info-tp6265339p6265339.html
 Sent from the GDAL - Dev mailing list archive at Nabble.com.
 ___
 gdal-dev mailing list
 gdal-dev@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/gdal-dev




-- 
___ ___ __
Ricardo Garcia Silva
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev