[R-sig-Geo] How to mask the area around a raster map with a buffer?

Hugo Costa hugo@gco@t@ @end|ng |rom gm@||@com
Thu Jan 31 23:25:28 CET 2019


Hi Sohrab,
without data it's difficult to give a definitive answer. However, a bit of
GIS and/or spatial analysis with raster package (e.g. mask function) may
work for you.
Cheers
Hugo

Sohrab Abbasnejad via R-sig-Geo <r-sig-geo using r-project.org> escreveu no dia
quinta, 31/01/2019 à(s) 15:35:

> Dear all,
>
> I have a dataframe with around 90k observations over an area including a
> continent (a raster object), and a variable of interest whose values I want
> to visualize on a map. I have used levelplot function from lattice package
> to visualize the data, and added a map of the continent to the plot as a
> layer (using a shapefile). So far, so good.
>
> My area of interest is the continent itself, but my data covers a larger
> area (including the oceans around the continent). I would like to keep the
> whole map but mask the ocean around the continent (with a buffer of 100km)
> and keep the values only for the continent.
>
> I would appreciate it if someone could help me achieve this.
>
> Thank you in advance,
> Sohrab
>
>         [[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