Check out ?alignExtent in library(raster)


On Fri, Jun 21, 2013 at 2:56 AM, Francisco Rodriguez Sanchez <
f.rodriguez.sanc@gmail.com> wrote:

> Hi Gerardo,
>
> It would help if you could provide a reproducible example to spot the
> problem... Anyway, try the spatial_sync_raster function in the
> spatial.tools package (http://cran.at.r-project.org/**
> web/packages/spatial.tools/**index.html<http://cran.at.r-project.org/web/packages/spatial.tools/index.html>).
> It will easily match the projection, resolution and extent of your rasters
> to a reference raster
>
> Hope it helps
>
> Paco
>
>
> El 21/06/2013 00:53, Gerardo escribió:
>
>  Hi all. I have a set of Raster layers I want to use to generate species
>> distribution models. Initially the files had all different projections,
>> resolution and extent. So i resampled and cropped them with a mask layer
>> with the extent I wanted. All was done in R. After the processing only a
>> few of the layers had the same extent and so they couldn't be stacked with
>> stack(files). I also tried creating an extent object with the exact
>> extension I wanted, but nothing worked, most files ended up with some
>> degree of error. The quick=T argument returned another error that said the
>> a character string was expected. Is there a function or a procedure to
>> equalise the extent of all the layers?
>>
>> Regards
>> Gerardo Martin
>>
>> ______________________________**_________________
>> R-sig-Geo mailing list
>> R-sig-Geo@r-project.org
>> https://stat.ethz.ch/mailman/**listinfo/r-sig-geo<https://stat.ethz.ch/mailman/listinfo/r-sig-geo>
>>
>
> --
> Dr Francisco Rodriguez-Sanchez
> Forest Ecology and Conservation Group
> Department of Plant Sciences
> University of Cambridge
> Downing Street
> Cambridge CB2 3EA
> United Kingdom
> http://sites.google.com/site/**rodriguezsanchezf<http://sites.google.com/site/rodriguezsanchezf>
>
>
> ______________________________**_________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/**listinfo/r-sig-geo<https://stat.ethz.ch/mailman/listinfo/r-sig-geo>
>



-- 
*Andrew P. Vitale*
Masters Student
Department of Geography
University of Nevada, Reno
(412) 915-3632
vitale232@gmail.com

	[[alternative HTML version deleted]]

