[GRASS-user] HDF-5 parse

Hello Pedro

My suggestion, in case you have a consistent dataset, would be to create your own script to read import HDF5 files. My question regarding this is it possible to have a "Browse files" button in a GRASS scripts?

Antonio

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4872 (20100216) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

Thank you all.
Regarding Antonio’s suggestion I will see if I can do that. It seems a good Idea. Is it possible to have a button to browse files?

Thanks
Best regards
Pedro

2010/2/17 António Rocha <antonio.rocha@deimos.com.pt>

Hello Pedro

My suggestion, in case you have a consistent dataset, would be to create your own script to read import HDF5 files. My question regarding this is it possible to have a “Browse files” button in a GRASS scripts?

Antonio

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4872 (20100216) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

Hello all

Regarding this question, I’m using a MSG SEVIRI product called FAPAR. And I’m a bit lost on import data to GRASS and rectify.

By making gldainfo I get:

Driver: HDF5/Hierarchical Data Format Release 5

Files: /mnt/GIS/DATA/HDF5_DATA_MSG_FAPAR_Euro_200702220000

Size is 512, 512

Coordinate System is `’

Subdatasets:

SUBDATASET_1_NAME=HDF5:“/mnt/GIS/DATA/HDF5_DATA_MSG_FAPAR_Euro_200702220000”://FAPAR

SUBDATASET_1_DESC=[651x1701] //FAPAR (8-bit integer)

SUBDATASET_2_NAME=HDF5:“/mnt/GIS/DATA/HDF5_DATA_MSG_FAPAR_Euro_200702220000”://FAPAR_QF

SUBDATASET_2_DESC=[651x1701] //FAPAR_QF (8-bit character)

SUBDATASET_3_NAME=HDF5:“/mnt/GIS/DATA/HDF5_DATA_MSG_FAPAR_Euro_200702220000”://FAPAR_err

SUBDATASET_3_DESC=[651x1701] //FAPAR_err (8-bit integer)

Corner Coordinates:

Upper Left ( 0.0, 0.0)

Lower Left ( 0.0, 512.0)

Upper Right ( 512.0, 0.0)

Lower Right ( 512.0, 512.0)

Center ( 256.0, 256.0)

I get a list of all subsets. Apparentely there is no coordinate system right?

But if I make

gdalinfo HDF5:“/mnt/GIS/DATA/HDF5_DATA_MSG_FAPAR_Euro_200702220000”://FAPAR (one of the SUBSETS) I get:

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”]],

AXIS[“Lat”,NORTH],

AXIS[“Long”,EAST],

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:

FAPAR:CLASS=Data

FAPAR:PRODUCT=product

FAPAR:PRODUCT_ID=0

FAPAR:N_COLS=1701

FAPAR:N_LINES=651

FAPAR:NB_BYTES=2

FAPAR:SCALING_FACTOR=10000

FAPAR:OFFSET=0

FAPAR:MISSING_VALUE=-10

FAPAR:UNITS=N/A

FAPAR:CAL_SLOPE=1

FAPAR:CAL_OFFSET=0

This means that it’s georreferenced right?

But if I do

r.in.gdal -o --quiet input=HDF5:“/mnt/GIS/ DATA /HDF5_DATA_MSG_FAPAR_Euro_200702220000”://FAPAR output=out00

I get the error:

Over-riding projection check

G_set_window(): Illegal latitude for NorthOver-riding projection check

G_set_window(): Illegal latitude for North

So it doesn’t’ work. I mean shouldn’t I be using gdalwarp in order to import and rectify image? Because there is not much inofmration regarding how to do this. I mean, it seems that if I do r.in.gdal I loose all GCP and coordinates system information…

Sorry for these lammer questions but I think I’m lost

Thanks

Pedro

2010/2/17 Pedro Roma <pedroroma1982@gmail.com>

Thank you all.
Regarding Antonio’s suggestion I will see if I can do that. It seems a good Idea. Is it possible to have a button to browse files?

Thanks
Best regards
Pedro

2010/2/17 António Rocha <antonio.rocha@deimos.com.pt>

Hello Pedro

My suggestion, in case you have a consistent dataset, would be to create your own script to read import HDF5 files. My question regarding this is it possible to have a “Browse files” button in a GRASS scripts?

Antonio

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4872 (20100216) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

2010/2/17 Pedro Roma <pedroroma1982@gmail.com>:

Hello all

Regarding this question, I’m using a MSG SEVIRI product called FAPAR. And
I’m a bit lost on import data to GRASS and rectify.

By making gldainfo I get:

Driver: HDF5/Hierarchical Data Format Release 5

Files: /mnt/GIS/DATA/HDF5_DATA_MSG_FAPAR_Euro_200702220000

Size is 512, 512

Coordinate System is `'

Subdatasets:

SUBDATASET_1_NAME=HDF5:"/mnt/GIS/DATA/HDF5_DATA_MSG_FAPAR_Euro_200702220000"://FAPAR

SUBDATASET_1_DESC=[651x1701] //FAPAR (8-bit integer)

SUBDATASET_2_NAME=HDF5:"/mnt/GIS/DATA/HDF5_DATA_MSG_FAPAR_Euro_200702220000"://FAPAR_QF

SUBDATASET_2_DESC=[651x1701] //FAPAR_QF (8-bit character)

SUBDATASET_3_NAME=HDF5:"/mnt/GIS/DATA/HDF5_DATA_MSG_FAPAR_Euro_200702220000"://FAPAR_err

SUBDATASET_3_DESC=[651x1701] //FAPAR_err (8-bit integer)

Corner Coordinates:

Upper Left ( 0.0, 0.0)

Lower Left ( 0.0, 512.0)

Upper Right ( 512.0, 0.0)

Lower Right ( 512.0, 512.0)

Center ( 256.0, 256.0)

I get a list of all subsets. Apparentely there is no coordinate system
right?

But if I make

gdalinfo HDF5:"/mnt/GIS/DATA/HDF5_DATA_MSG_FAPAR_Euro_200702220000"://FAPAR
(one of the SUBSETS) I get:

Driver: HDF5Image/HDF5 Dataset

Files: none associated

Size is 1701, 651

Coordinate System is:

GEOGCS["WGS 84",

DATUM\[&quot;WGS\_1984&quot;,

    SPHEROID\[&quot;WGS 84&quot;,6378137,298\.257223563,

        AUTHORITY\[&quot;EPSG&quot;,&quot;7030&quot;\]\],

    TOWGS84\[0,0,0,0,0,0,0\],

    AUTHORITY\[&quot;EPSG&quot;,&quot;6326&quot;\]\],

PRIMEM\[&quot;Greenwich&quot;,0,

    AUTHORITY\[&quot;EPSG&quot;,&quot;8901&quot;\]\],

UNIT\[&quot;degree&quot;,0\.0174532925199433,

    AUTHORITY\[&quot;EPSG&quot;,&quot;9108&quot;\]\],

AXIS\[&quot;Lat&quot;,NORTH\],

AXIS\[&quot;Long&quot;,EAST\],

AUTHORITY\[&quot;EPSG&quot;,&quot;4326&quot;\]\]

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:

FAPAR:CLASS=Data

FAPAR:PRODUCT=product

FAPAR:PRODUCT\_ID=0

FAPAR:N\_COLS=1701

FAPAR:N\_LINES=651

FAPAR:NB\_BYTES=2

FAPAR:SCALING\_FACTOR=10000

FAPAR:OFFSET=0

FAPAR:MISSING\_VALUE=\-10

FAPAR:UNITS=N/A

FAPAR:CAL\_SLOPE=1

FAPAR:CAL\_OFFSET=0

This means that it’s georreferenced right?

Not necessarily. It is also possible that GCPs are stored and gdalwarp
needs to be
used first to obtain a really geocoded file.

But if I do

r.in.gdal -o --quiet input=HDF5:"/mnt/GIS/ DATA
/HDF5_DATA_MSG_FAPAR_Euro_200702220000"://FAPAR output=out00

I get the error:

Over-riding projection check

G_set_window(): Illegal latitude for NorthOver-riding projection check

G_set_window(): Illegal latitude for North

So it doesn’t’ work. I mean shouldn’t I be using gdalwarp in order to import
and rectify image?

Say, use gdalwarp to preprocess the data. Please try with one channel and
post what gdalinfo reports on the resulting file.

Markus

Because there is not much inofmration regarding how to do
this. I mean, it seems that if I do r.in.gdal I loose all GCP and
coordinates system information...

Sorry for these lammer questions but I think I'm lost

Thanks

Pedro

2010/2/17 Pedro Roma <pedroroma1982@gmail.com>

Thank you all.
Regarding Antonio's suggestion I will see if I can do that. It seems a
good Idea. Is it possible to have a button to browse files?
Thanks
Best regards
Pedro

2010/2/17 António Rocha <antonio.rocha@deimos.com.pt>

Hello Pedro

My suggestion, in case you have a consistent dataset, would be to create
your own script to read import HDF5 files. My question regarding this is it
possible to have a "Browse files" button in a GRASS scripts?

Antonio

__________ Information from ESET NOD32 Antivirus, version of virus
signature database 4872 (20100216) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Pedro, regarding MODIS tip, that someone gave you, please try Method 1 and see what happens. I think it will be enough. Please pay attention to HDF5 instead of HDF4.

Antonio

Markus Neteler wrote:

2010/2/17 Pedro Roma <pedroroma1982@gmail.com>:
  

Hello all

Regarding this question, I’m using a MSG SEVIRI product called FAPAR. And
I’m a bit lost on import data to GRASS and rectify.

By making gldainfo I get:

Driver: HDF5/Hierarchical Data Format Release 5

Files: /mnt/GIS/DATA/HDF5_DATA_MSG_FAPAR_Euro_200702220000

Size is 512, 512

Coordinate System is `'

Subdatasets:

SUBDATASET_1_NAME=HDF5:"/mnt/GIS/DATA/HDF5_DATA_MSG_FAPAR_Euro_200702220000"://FAPAR

  SUBDATASET_1_DESC=[651x1701] //FAPAR (8-bit integer)

SUBDATASET_2_NAME=HDF5:"/mnt/GIS/DATA/HDF5_DATA_MSG_FAPAR_Euro_200702220000"://FAPAR_QF

  SUBDATASET_2_DESC=[651x1701] //FAPAR_QF (8-bit character)

SUBDATASET_3_NAME=HDF5:"/mnt/GIS/DATA/HDF5_DATA_MSG_FAPAR_Euro_200702220000"://FAPAR_err

  SUBDATASET_3_DESC=[651x1701] //FAPAR_err (8-bit integer)

Corner Coordinates:

Upper Left ( 0.0, 0.0)

Lower Left ( 0.0, 512.0)

Upper Right ( 512.0, 0.0)

Lower Right ( 512.0, 512.0)

Center ( 256.0, 256.0)

I get a list of all subsets. Apparentely there is no coordinate system
right?

But if I make

gdalinfo HDF5:"/mnt/GIS/DATA/HDF5_DATA_MSG_FAPAR_Euro_200702220000"://FAPAR
(one of the SUBSETS) I get:

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"]],

    AXIS["Lat",NORTH],

    AXIS["Long",EAST],

    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:

    FAPAR:CLASS=Data

    FAPAR:PRODUCT=product

    FAPAR:PRODUCT_ID=0

    FAPAR:N_COLS=1701

    FAPAR:N_LINES=651

    FAPAR:NB_BYTES=2

    FAPAR:SCALING_FACTOR=10000

    FAPAR:OFFSET=0

    FAPAR:MISSING_VALUE=-10

    FAPAR:UNITS=N/A

    FAPAR:CAL_SLOPE=1

    FAPAR:CAL_OFFSET=0

This means that it’s georreferenced right?
    
Not necessarily. It is also possible that GCPs are stored and gdalwarp
needs to be
used first to obtain a really geocoded file.

But if I do

r.in.gdal -o --quiet input=HDF5:"/mnt/GIS/ DATA
/HDF5_DATA_MSG_FAPAR_Euro_200702220000"://FAPAR output=out00

I get the error:

Over-riding projection check

G_set_window(): Illegal latitude for NorthOver-riding projection check

G_set_window(): Illegal latitude for North

So it doesn’t’ work. I mean shouldn’t I be using gdalwarp in order to import
and rectify image?
    
Say, use gdalwarp to preprocess the data. Please try with one channel and
post what gdalinfo reports on the resulting file.

Markus

Because there is not much inofmration regarding how to do
this. I mean, it seems that if I do r.in.gdal I loose all GCP and
coordinates system information...

Sorry for these lammer questions but I think I'm lost

Thanks

Pedro

2010/2/17 Pedro Roma <pedroroma1982@gmail.com>
    

Thank you all.
Regarding Antonio's suggestion I will see if I can do that. It seems a
good Idea. Is it possible to have a button to browse files?
Thanks
Best regards
Pedro

2010/2/17 António Rocha <antonio.rocha@deimos.com.pt>
      

Hello Pedro

My suggestion, in case you have a consistent dataset, would be to create
your own script to read import HDF5 files. My question regarding this is it
possible to have a "Browse files" button in a GRASS scripts?

Antonio

__________ Information from ESET NOD32 Antivirus, version of virus
signature database 4872 (20100216) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4874 (20100217) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

__________ Information from ESET NOD32 Antivirus, version of virus signature database 4874 (20100217) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

Hey

Not necessarily. It is also possible that GCPs are stored and gdalwarp
needs to be
used first to obtain a really geocoded file.

Say, use gdalwarp to preprocess the data. Please try with one channel and
post what gdalinfo reports on the resulting file.

Since GRASS documentation extensively preprocess to GEOTIFF, I will try that. Is it the best thing to do?
ok here it goes

By using

gdalinfo HDF5:“/mnt/GIS/DATA/HDF5_DATA_MSG_FAPAR_Euro_200702220000”://FAPAR

I get:

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”]],
AXIS[“Lat”,NORTH],
AXIS[“Long”,EAST],
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:
FAPAR:CLASS=Data
FAPAR:PRODUCT=product
FAPAR:PRODUCT_ID=0
FAPAR:N_COLS=1701
FAPAR:N_LINES=651
FAPAR:NB_BYTES=2
FAPAR:SCALING_FACTOR=10000
FAPAR:OFFSET=0
FAPAR:MISSING_VALUE=-10
FAPAR:UNITS=N/A
FAPAR:CAL_SLOPE=1
FAPAR:CAL_OFFSET=0

If I do :

gdalwarp HDF5:“/mnt/GIS/LSASAF/HDF5_LSASAF_MSG_FAPAR_Euro_200702220000”://FAPAR /mnt/GIS/testing.tif
I get:

ERROR 1: Unable to compute a transformation between pixel/line
and georeferenced coordinates for HDF5:/mnt/GIS/LSASAF/HDF5_LSASAF_MSG_FAPAR_Euro_200702220000://FAPAR.
There is no affine transformation and no GCPs.

Is this helpful to solve this question?
At MODIS Wiki (http://grass.osgeo.org/wiki/MODIS) Gdal Warp is not used. Instead, it’s create a intermediate file (TIF) using gdal_translate and only then is r.in.gdal is used.

Thank you Markus and Antonio and Hamish for your help

Markus

Because there is not much inofmration regarding how to do
this. I mean, it seems that if I do r.in.gdal I loose all GCP and
coordinates system information…

Sorry for these lammer questions but I think I’m lost

Thanks

Pedro

2010/2/17 Pedro Roma <pedroroma1982@gmail.com>

Thank you all.
Regarding Antonio’s suggestion I will see if I can do that. It seems a
good Idea. Is it possible to have a button to browse files?
Thanks
Best regards
Pedro

2010/2/17 António Rocha <antonio.rocha@deimos.com.pt>

Hello Pedro

My suggestion, in case you have a consistent dataset, would be to create
your own script to read import HDF5 files. My question regarding this is it
possible to have a “Browse files” button in a GRASS scripts?

Antonio

__________ Information from ESET NOD32 Antivirus, version of virus
signature database 4872 (20100216) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Pedro Roma wrote:

By usinggdalinfo
HDF5:"/mnt/GIS/DATA/HDF5_DATA_MSG_FAPAR_Euro_200702220000"://FAPAR
I get:Driver:
HDF5Image/HDF5 Dataset
Files: none associatedSize is 1701,
651Coordinate 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"]],
AXIS["Lat",NORTH],
    AXIS["Long",EAST],
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:
FAPAR:CLASS=Data
FAPAR:PRODUCT=product
    FAPAR:PRODUCT_ID=0
FAPAR:N_COLS=1701
FAPAR:N_LINES=651
FAPAR:NB_BYTES=2
FAPAR:SCALING_FACTOR=10000
FAPAR:OFFSET=0
FAPAR:MISSING_VALUE=-10
    FAPAR:UNITS=N/A
FAPAR:CAL_SLOPE=1
FAPAR:CAL_OFFSET=0

If I do :gdalwarp
HDF5:"/mnt/GIS/LSASAF/HDF5_LSASAF_MSG_FAPAR_Euro_200702220000"://FAPAR
/mnt/GIS/testing.tif
I get:ERROR 1: Unable to compute a
transformation between pixel/lineand
georeferenced coordinates for
HDF5:/mnt/GIS/LSASAF/HDF5_LSASAF_MSG_FAPAR_Euro_200702220000://FAPAR.

*****

There is no affine transformation and no GCPs.

*****

the above tells you that it is in lat/lon WGS84, but the image itself
is not georeferenced.

are there possibly additional data bands named "lat" and "long" or so?
do you know what the north/south/east/west & resolution should be?

maybe there is another HDF5 viewer (ISTR a java one from NASA?) which
will export the info if it is a gdal or libhdf problem which is stopping
you from seeing that information (if it is there at all)

Is this helpful to solve this
question?At MODIS Wiki (http://grass.osgeo.org/wiki/MODIS)
Gdal Warp is not used. Instead, it's create a
intermediate file (TIF) using gdal_translate and only then
is r.in.gdal is used.

gdalwarp is used if there is no north/south/east/west info beyond the
number of image pixels, but there are a series of GCPs listed.

Hamish

hello Hamish

With some support from Ricardo I realized that there are also 2 other HDF5 files, one with latitude of each pixel and the other with longitude. So, now I have a latitude dataset, a longitude and values. How can I “merge” this and import to GRASS (georreferenced and bla bla)? (THat I wasn’t expecting to have).

By the way, thanks about gdalwarp enlightment.

Pedro

On Thu, Feb 18, 2010 at 12:17 PM, Hamish <hamish_b@yahoo.com> wrote:

Pedro Roma wrote:

By usinggdalinfo

HDF5:“/mnt/GIS/DATA/HDF5_DATA_MSG_FAPAR_Euro_200702220000”://FAPAR
I get:Driver:
HDF5Image/HDF5 Dataset
Files: none associatedSize is 1701,

651Coordinate 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”]],
AXIS[“Lat”,NORTH],
AXIS[“Long”,EAST],
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:
FAPAR:CLASS=Data
FAPAR:PRODUCT=product
FAPAR:PRODUCT_ID=0
FAPAR:N_COLS=1701
FAPAR:N_LINES=651
FAPAR:NB_BYTES=2
FAPAR:SCALING_FACTOR=10000
FAPAR:OFFSET=0
FAPAR:MISSING_VALUE=-10
FAPAR:UNITS=N/A
FAPAR:CAL_SLOPE=1
FAPAR:CAL_OFFSET=0

If I do :gdalwarp
HDF5:“/mnt/GIS/LSASAF/HDF5_LSASAF_MSG_FAPAR_Euro_200702220000”://FAPAR
/mnt/GIS/testing.tif
I get:ERROR 1: Unable to compute a
transformation between pixel/lineand
georeferenced coordinates for
HDF5:/mnt/GIS/LSASAF/HDF5_LSASAF_MSG_FAPAR_Euro_200702220000://FAPAR.


There is no affine transformation and no GCPs.


the above tells you that it is in lat/lon WGS84, but the image itself
is not georeferenced.

are there possibly additional data bands named “lat” and “long” or so?
do you know what the north/south/east/west & resolution should be?

maybe there is another HDF5 viewer (ISTR a java one from NASA?) which
will export the info if it is a gdal or libhdf problem which is stopping
you from seeing that information (if it is there at all)

Is this helpful to solve this
question?At MODIS Wiki (http://grass.osgeo.org/wiki/MODIS)
Gdal Warp is not used. Instead, it’s create a
intermediate file (TIF) using gdal_translate and only then
is r.in.gdal is used.

gdalwarp is used if there is no north/south/east/west info beyond the
number of image pixels, but there are a series of GCPs listed.

Hamish

Hey

Not necessarily. It is also possible that GCPs are stored and gdalwarp
needs to be
used first to obtain a really geocoded file.

Say, use gdalwarp to preprocess the data. Please try with one channel and

post what gdalinfo reports on the resulting file.

Since GRASS documentation extensively preprocess to GEOTIFF, I will try that. Is it the best thing to do?
ok here it goes

By using

gdalinfo HDF5:“/mnt/GIS/DATA/HDF5_DATA_MSG_FAPAR_Euro_200702220000”://FAPAR

I get:

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”]],
AXIS[“Lat”,NORTH],
AXIS[“Long”,EAST],
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:
FAPAR:CLASS=Data
FAPAR:PRODUCT=product
FAPAR:PRODUCT_ID=0
FAPAR:N_COLS=1701
FAPAR:N_LINES=651
FAPAR:NB_BYTES=2
FAPAR:SCALING_FACTOR=10000
FAPAR:OFFSET=0
FAPAR:MISSING_VALUE=-10
FAPAR:UNITS=N/A
FAPAR:CAL_SLOPE=1
FAPAR:CAL_OFFSET=0

If I do :

gdalwarp HDF5:“/mnt/GIS/LSASAF/HDF5_LSASAF_MSG_FAPAR_Euro_200702220000”://FAPAR /mnt/GIS/testing.tif
I get:

ERROR 1: Unable to compute a transformation between pixel/line
and georeferenced coordinates for HDF5:/mnt/GIS/LSASAF/HDF5_LSASAF_MSG_FAPAR_Euro_200702220000://FAPAR.
There is no affine transformation and no GCPs.

Is this helpful to solve this question?
At MODIS Wiki (http://grass.osgeo.org/wiki/MODIS) Gdal Warp is not used. Instead, it’s create a intermediate file (TIF) using gdal_translate and only then is r.in.gdal is used.

Thank you Markus and Antonio and Hamish for your help

Markus

Because there is not much inofmration regarding how to do
this. I mean, it seems that if I do r.in.gdal I loose all GCP and
coordinates system information…

Sorry for these lammer questions but I think I’m lost

Thanks

Pedro

2010/2/17 Pedro Roma <pedroroma1982@gmail.com>

Thank you all.
Regarding Antonio’s suggestion I will see if I can do that. It seems a
good Idea. Is it possible to have a button to browse files?
Thanks
Best regards
Pedro

2010/2/17 António Rocha <antonio.rocha@deimos.com.pt>

Hello Pedro

My suggestion, in case you have a consistent dataset, would be to create
your own script to read import HDF5 files. My question regarding this is it
possible to have a “Browse files” button in a GRASS scripts?

Antonio

__________ Information from ESET NOD32 Antivirus, version of virus
signature database 4872 (20100216) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Tue, Feb 23, 2010 at 10:16 AM, Pedro Roma <pedroroma1982@gmail.com> wrote:

By using
gdalinfo HDF5:"/mnt/GIS/DATA/HDF5_DATA_MSG_FAPAR_Euro_200702220000"://FAPAR
I get:
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"]],
AXIS["Lat",NORTH],
AXIS["Long",EAST],
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:
FAPAR:CLASS=Data
FAPAR:PRODUCT=product
FAPAR:PRODUCT_ID=0
FAPAR:N_COLS=1701
FAPAR:N_LINES=651
FAPAR:NB_BYTES=2
FAPAR:SCALING_FACTOR=10000
FAPAR:OFFSET=0
FAPAR:MISSING_VALUE=-10
FAPAR:UNITS=N/A
FAPAR:CAL_SLOPE=1
FAPAR:CAL_OFFSET=0
If I do :
gdalwarp
HDF5:"/mnt/GIS/LSASAF/HDF5_LSASAF_MSG_FAPAR_Euro_200702220000"://FAPAR
/mnt/GIS/testing.tif

I get:
ERROR 1: Unable to compute a transformation between pixel/line
and georeferenced coordinates for
HDF5:/mnt/GIS/LSASAF/HDF5_LSASAF_MSG_FAPAR_Euro_200702220000://FAPAR.
There is no affine transformation and no GCPs.

Since this is a GDAL problem, please ask on the GDAL list.

Did you try the MODIS Reprojection Tool? Does that fail as well?

Markus