hi all,

I am trying to correctly define the raster projection parameters
(projection, extent, etc.) derived from an imported MERIS (*.hdf) image in
R.
With readGDAL() the data of the .hdf file for one band can be read but
raster coord. ref., extent, and resolution seem not to be correct.

NDVI <- readGDAL(
HDF4_EOS:EOS_GRID:"/tmp/Rtmp5yqr5q/test.hdf":MERIS_300m:NDVI)

> NDVIclass       : RasterLayer
dimensions  : 1800, 1800, 3240000  (nrow, ncol, ncell)
resolution  : 7.716049e-07, 7.716049e-07  (x, y)
extent      : -3.858333e-07, 0.001388503, 0.0111115, 0.01250039
(xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +ellps=clrk66 +no_defs
values      : in memory
min value   : 38
max value   : 249


The .hdf files are available here: http://due.esrin.esa.int/culturemeris/

and projection info can be found here:

http://due.esrin.esa.int/culturemeris/CULTURE-MERIS_PDM_2.0.pdf


The projection info is defined as: (see pdf)

Plate-Carrée with a Geographic Lat/Lon representation (GCTP_GEO)
WGS 84 (R= Spherical Radius= Equatorial Radius=Re= 6378,14km)



I have been trying a few options now but did not manage to obtain the
correct settings:
## set the correct NDVI projection settings res(NDVI) <- 1/360 # OK

> projection(NDVI) <- CRS('+proj=eqc+lat_ts=0+lat_0=0+lon_0=0+x_0=0+y_0=0+ellps=WGS84+datum=WGS84+units=m+no_defs')Error in CRS("+proj=eqc+lat_ts=0+lat_0=0+lon_0=0+x_0=0+y_0=0+ellps=WGS84+datum=WGS84+units=m+no_defs") :
  unknown projection id> projection(NDVI) <-
'+proj=eqc+lat_ts=0+lat_0=0+lon_0=0+x_0=0+y_0=0+a=6371007+b=6371007+units=m
+no_defs'Warning message:In .newCRS(value) :
  +proj=eqc+lat_ts=0+lat_0=0+lon_0=0+x_0=0+y_0=0+a=6371007+b=6371007+units=m
+no_defs is not a valid proj4 CRS string

>


I there as solution to set the projection(NDVI)? EPSG:32662 or 32663?


Thanks for your help,

Jan

	[[alternative HTML version deleted]]

