[R-sig-Geo] Coverting CRS in R to OSGB 1936

Alaba Boluwade @|@b@@bo|uw@de @end|ng |rom m@||@mcg|||@c@
Tue Nov 29 18:59:47 CET 2022


Try:

library(raster)

new_raster<-spTransform(old_raster,CRS("+proj=longlat +ellps=airy +no_defs"))

Good luck
Alaba

________________________________
From: R-sig-Geo <r-sig-geo-bounces using r-project.org> on behalf of Nick Wray <nickmwray using gmail.com>
Sent: November 29, 2022 10:25 AM
To: r-sig-geo using r-project.org <r-sig-geo using r-project.org>
Subject: [R-sig-Geo] Coverting CRS in R to OSGB 1936

Hello   I have shapefile data (of the river Tweed catchment in N England
and Scotland) which I have been able to plot precipitation and temperature
data onto without too many problems.  These data have the OSGB 1936/British
National Grid  CRS projection.

But I now have a raster of land cover (from the Centre for Ecology and
Hydrology) covering the catchment area which I want to incorporate into my
processing.  I have downloaded the raster into R and its properties are

class      : RasterLayer
band       : 1  (of  5  bands)
dimensions : 4914, 8861, 43542954  (nrow, ncol, ncell)
resolution : 25, 25  (x, y)
extent     : 261400, 482925, 576750, 699600  (xmin, xmax, ymin, ymax)
crs        : +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000
+y_0=-100000 +ellps=airy +units=m +no_defs
source     : LCM.tif
names      : LCM
values     : 0, 255  (min, max)

So it has a different CRS - my question is - how (in R) can I reset the
raster CRS to be the same as my earlier data sets ie OSGB 1936 British
National Grid?  I haven't been able to find anything obvious on the net.
Thanks Nick Wray

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo using r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list