[R-sig-Geo] converting the projection

Michael Sumner mdsumner at gmail.com
Tue Sep 19 23:03:45 CEST 2017


Try projecting just the extent
library(raster)
ex <- projectExtent(a,  projection(b))
clip(b,  ex)

where a,  b are your two raster.

Cheers,  Mike

On Wed, 20 Sep 2017, 06:18 Kyongho Son <kkyong77 at hotmail.com> wrote:

>
> Hi I have two raster data sets but they have two datum and projection.
>
> I would like to convert one to the other since I would like to clip the
> one raster using the other raster.
>
> they should have same projections.
>
>
> proj4string(bb)
> [1] "+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"
> proj4string(SOSTavg)
>
>  proj4string(SOSTavg)
> [1] "+proj=laea +lat_0=-100 +lon_0=6370997 +x_0=45 +y_0=0 +ellps=WGS84
> +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
>
>
> Thanks,
>
> Kyongho
>
>
>
>
>
>
>
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
-- 
Dr. Michael Sumner
Software and Database Engineer
Australian Antarctic Division
203 Channel Highway
Kingston Tasmania 7050 Australia

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list