Skip to content
Prev 26002 / 29559 Next

converting the projection from Lambert to WGS84 or NAD83

Hi Kyongho,

There seems to be something strange with your eMODIS raster, which I 
understood represents something in the eastern US. There might be 
something wrong with the coordinates or the original projection 
information. When I reprojected it to global lonlat to see which area it 
covers, it actually fell in Antartica! (see 
https://i.imgur.com/wjTBt8E.png). So, I'm not sure if I got it 
correctly, but I think that's not what you expect. That would explain 
the error that the extents do not overlap.

Reproducible example follows:

library(raster)

## Create raster with same extent and projection
emodis <- raster(xmn = 243000, xmx = 2536500, ymn = -2136500, ymx = 752500,
 ???????????????? resolution = 10000,
 ???????????????? crs = "+proj=laea +lat_0=-100 +lon_0=6370997 +x_0=45 
+y_0=0 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0",
 ???????????????? vals = 0)

emodis
#> class?????? : RasterLayer
#> dimensions? : 289, 229, 66181? (nrow, ncol, ncell)
#> resolution? : 10000, 10000? (x, y)
#> extent????? : 243000, 2533000, -2137500, 752500? (xmin, xmax, ymin, ymax)
#> coord. ref. : +proj=laea +lat_0=-100 +lon_0=6370997 +x_0=45 +y_0=0 
+datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0
#> data source : in memory
#> names?????? : layer
#> values????? : 0, 0? (min, max)

## Project to lonlat to see where it falls
emodis.lonlat <- projectRaster(emodis, crs = "+proj=longlat +datum=WGS84")

library(maptools)
data(wrld_simpl)
plot(wrld_simpl)
plot(emodis.lonlat, add = TRUE)

# See map at ![](https://i.imgur.com/wjTBt8E.png)

Hope this helps!

Cheers,

Paco



El 20/09/2017 a las 21:50, Kyongho Son escribi?: