[R-sig-Geo] projection issue - can one rotate a projection?

MacQueen, Don macqueen1 at llnl.gov
Fri Aug 2 21:19:53 CEST 2013


The elide function in the maptools package has a 'rotate' argument and may
be able to do what you need.

-Don

-- 
Don MacQueen

Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062





On 7/31/13 3:17 AM, "Tanya Rijkenberg Compton"
<tanyajcompton at yahoo.com.au> wrote:

>Hi all
>
>My colleague, a physical oceanographer, and I are having problems getting
>his geographic layers into the correct projection (after importing as a
>netcdf file), and we are hoping someone can help us. We are using the
>Raster package.
>
>My colleague obtains a Dutch Rijksdriehoek in the first instance but then
>rotates this by 17 degrees to run his models. He then provides me with a
>netcdf file where the layers are still projected at 17 degrees from the
>normal Rijksdriehoek.
>
>Is there a way in R to rotate the layers back from the 17 degrees?
>
>If anyone can help we would greatly appreciate it!
>
>Thanks
>
>Tanya and Matias
>
>
>
>R Code 
># Load the packages:
>library("sp")
>library("ncdf4")
>library(raster)
>
># get the netcdf and read in to R
>d <- raster("test_layers.nc", varname = "time_exp")
>
># rijksdriehoek projection
>RD <-CRS("+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889
>+k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs")
>##http://spatialreference.org/ref/epsg/28992/proj4/,
>
># reproject to Rijksdriehoek
>pr1 <- projectRaster(d, crs=newproj)
>	[[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



More information about the R-sig-Geo mailing list