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

Barry Rowlingson b@row||ng@on @end|ng |rom gm@||@com
Wed Nov 30 10:12:30 CET 2022


As I said on gis.stackoverflow, these two things are probably in the
same CRS anyway.

But also some people have replied suggesting you transform the raster.
DONT! (Unless you really have to...). If your raster had been
something like 0.5 degree lat-long cells, then transforming it EPSG
27700 (GB grid) would be a "lossy" and non-reversible process. Far far
better to always transform *vector* data to a given raster CRS and
work there, since the vector coordinate transform is exact and
reversible (to very high precision in most cases).

If you have two rasters on different coordinate systems, eg one is 100
metre pixels in EPSG 27700 and the other is 0.05 degree in lat-long,
that's the time you have to carefully consider which one to use as
your basis and which one to warp.


On Tue, Nov 29, 2022 at 5:25 PM Nick Wray <nickmwray using gmail.com> wrote:
>
> 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



More information about the R-sig-Geo mailing list