[GRASS-dev] MODIS import in GRASS6.4

I have been using MODIS datasets in MRT tool and MATLAB but Now I want to import MODIS projected datasets to GRASS .

At http://grass.osgeo.org/wiki/MODIS is described methods to do this. But I have a few (quick) questions. Thanks for your help

Question 1: can those methods be applied using a GRASS Script? (I believe so)

Question 2: in method 1 (http://grass.osgeo.org/wiki/MODIS#Method_1), It’s said to create a Project/mapset with EPSG 3266. Why that system? And Why if gdal_translate will create geotiff in EPSG4326?

Question 3: Regarding a_ullr. This flag asks for Upperleft and lowerright. This means that those values are the same for all files. But in the case that they may vary. How can I obtain them from MODIS Metadata/header? And this would mean that the we are dealing with a regular dataset because in a Geostationary dataset this wouldn’t be possible (I guess).

Question 4: What is the –co flag? I read Gdal_translate description but I didn’t find it very clear…

Question 5: As far as I can see, Geotiff format is used as an intermediate format in order to import data to GRASS. Why is it chosen?

Question 6: Since GDAL does not automatically georeference HDF4 images, is there a list of the formats that GDAL automatically georreference?

Question 7: if we define a_ullr, this means that GCP points are not being used right?

Regarding method 2, that is based on GRASS6.5, will this be implemented for grass 6.4? (the –i flag)

Thank you

See ya

Franz

I have been using MODIS datasets in MRT tool and MATLAB but Now I want to import MODIS projected datasets to GRASS .

At http://grass.osgeo.org/wiki/MODIS is described methods to do this. But I have a few (quick) questions. Thanks for your help

Question 1: can those methods be applied using a GRASS Script? (I believe so)

Question 2: in method 1 (http://grass.osgeo.org/wiki/MODIS#Method_1), It’s said to create a Project/mapset with EPSG 3266. Why that system? And Why if gdal_translate will create geotiff in EPSG4326?

Question 3: Regarding a_ullr. This flag asks for Upperleft and lowerright. This means that those values are the same for all files. But in the case that they may vary. How can I obtain them from MODIS Metadata/header? And this would mean that the we are dealing with a regular dataset because in a Geostationary dataset this wouldn’t be possible (I guess).

Question 4: What is the –co flag? I read Gdal_translate description but I didn’t find it very clear…

Question 5: As far as I can see, Geotiff format is used as an intermediate format in order to import data to GRASS. Why is it chosen?

Question 6: Since GDAL does not automatically georeference HDF4 images, is there a list of the formats that GDAL automatically georreference?

Question 7: if we define a_ullr, this means that GCP points are not being used right?

Regarding method 2, that is based on GRASS6.5, will this be implemented for grass 6.4? (the –i flag)

Thank you

See ya

Franz

On Thu, Feb 18, 2010 at 4:38 PM, Franz Schiller
<franzschiller1975@gmail.com> wrote:

I have been using MODIS datasets in MRT tool and MATLAB but Now I want to
import MODIS projected datasets to GRASS .

At http://grass.osgeo.org/wiki/MODIS is described methods to do this. But I
have a few (quick) questions. Thanks for your help

Quick questions yes, but not so easy to answer!

Question 1: can those methods be applied using a GRASS Script? (I believe
so)

yes and no: I use MRT in batch mode within a GRASS script. Not sure
if this answers your question.

Question 2: in method 1 (http://grass.osgeo.org/wiki/MODIS#Method_1), It’s
said to create a Project/mapset with EPSG 3266. Why that system? And Why if
gdal_translate will create geotiff in EPSG4326?

I personally stick with
http://grass.osgeo.org/wiki/MODIS#Method_0
The gdal way is too messy for me.

Question 3: Regarding a_ullr. This flag asks for Upperleft and lowerright.
This means that those values are the same for all files. But in the case
that they may vary. How can I obtain them from MODIS Metadata/header?

They should be in the XML file.

And
this would mean that the we are dealing with a regular dataset because in a
Geostationary dataset this wouldn’t be possible (I guess).

Geostationary (Terra and Aqua are polar orbiting)? not sure what you mean.

Question 4: What is the –co flag? I read Gdal_translate description but I
didn’t find it very clear..

-co: compression of resulting file

Feel free to improve the Wiki page.

Question 5: As far as I can see, Geotiff format is used as an intermediate
format in order to import data to GRASS. Why is it chosen?

Because it is well known. You can chose whatever you like and works.

Question 6: Since GDAL does not automatically georeference HDF4 images, is
there a list of the formats that GDAL automatically georreference?

Yes:
http://www.gdal.org/formats_list.html

Question 7: if we define a_ullr, this means that GCP points are not being
used right?

I have no idea (since I prefer MRT).

Regarding method 2, that is based on GRASS6.5, will this be implemented for
grass 6.4? (the –i flag)

I guess in 6.4.1 if it can be backported.

Markus

Franz wrote:

I have been using MODIS datasets in MRT tool and MATLAB but Now I
want to import MODIS projected datasets to GRASS .

At http://grass.osgeo.org/wiki/MODIS
is described methods to do this.

Markus answered most of these, but I'll throw in another 2c.

Question 1: can those methods be applied using a GRASS Script?
(I believe so)

(yes)

Question 2: in method 1 (http://grass.osgeo.org/wiki/MODIS#Method_1),
It’s said to create a Project/mapset with EPSG 3266. Why that system?
And Why if gdal_translate will create geotiff in EPSG4326?

It says you might try that, not that you definitely should.
EPSG:32662 is "Plate Carree"

# WGS 84 / Plate Carree
<32662> +proj=eqc +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_
defs <>

A number of global datasets ship in this. With ~4km pixels a possible
datum error of 150m away from the wgs84 DATUM isn't going to be very
noticeable. but a switch between the wgs84 ELLIPSOID and a perfect
sphere can lead to errors of ~25km.

Consult your metadata. Hopefully it gives some guidance (often it
doesn't though, hence the confusion).

Question 3:
Regarding a_ullr. This flag asks for Upperleft and lowerright. This
means that those values are the same for all files. But in the case
that they may vary. How can I obtain them from MODIS Metadata/header?
And this would mean that the we are dealing with a regular dataset
because in a Geostationary dataset this wouldn’t be possible (I guess).

parse gdalinfo or as Markus suggested the associated XML file?)

Question 4:
What is the –co flag? I read Gdal_translate description
but I didn’t find it very clear..

see the r.out.gdal help page for more on compression.

Question 7: if we define
a_ullr, this means that GCP points are
not being used right?

if gdalinfo can see GCPs but not map bounds, use 'gdalwarp -tps' to
apply the GCPs and make a georeferenced image which can be loaded into
grass.

Regarding method 2, that
is based on GRASS6.5, will this be
implemented for grass 6.4? (the –i
flag)

if no problems are reported in testing it will be backported to 6.4.1.

Hamish