[R-sig-Geo] How to speed up the projection of a raster

Manuel Spínola mspinola10 at gmail.com
Fri Feb 19 16:08:44 CET 2016


Dear list members,

I am trying to reproject a raster (see the code below), however the process
is too slow.  What I need to do to speed up the process? It took me seconds
to do the task in QGIS, but I prefer to do other raster projections in r.

Thank you very much in advance.

> ras = raster("lc.grd")
> ras

class       : RasterLayer
dimensions  : 16118, 21959, 353935162  (nrow, ncol, ncell)
resolution  : 98.4252, 98.4252  (x, y)
extent      : 183871.7, 2345191, 88600.88, 1675018  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5
+x_0=399999.9999999999 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=ft
+no_defs
data source :
C:\Users\Manuel\Documents\Documentos_personales\Clases_y_Cursos\Clases\ICOMVIS\03_Evaluacion_del_Habitat\Practicos\Practica_03_Seleccion_de_habitat_Paisaje\oregon\lc.grd
names       : w001001
values      : 0, 95  (min, max)
attributes  :
       ID   COUNT       RED     GREEN      BLUE
 from:  0   60051 0.0000000 0.0000000 0.0000000
 to  : 95 2481857 0.4392157 0.6392157 0.7294118
                    LAND_COVER OPACITY
                  Unclassified       1
 Emergent Herbaceuous Wetlands       1



> rasp = projectRaster(ras, crs = "+proj=longlat +datum=WGS84", method =
"ngb")

-- 
*Manuel Spínola, Ph.D.*
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
mspinola at una.ac.cr
mspinola10 at gmail.com
Teléfono: (506) 2277-3598
Fax: (506) 2237-7036
Personal website: Lobito de río <https://sites.google.com/site/lobitoderio/>
Institutional website: ICOMVIS <http://www.icomvis.una.ac.cr/>

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list