[R] clip a raster according to a shape file in R.

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Tue May 2 18:57:21 CEST 2017


The answer is yes. However there are quite a few online resources (including blogs and the CRAN Spatial Task View and vignettes for packages mentioned there) that describe various tools and step you through how to do this, and you have not provided a reproducible example, and there is a whole mailing list dedicated to the topic (R-sig-geo), so I will just suggest that you read the Posting Guide mentioned below and (if needed) show the R-sig-geo mailing list your best attempt so they know how to help you. 
-- 
Sent from my phone. Please excuse my brevity.

On May 1, 2017 8:30:19 PM PDT, "M.M saifuddin" <mmsaifuddin09 at gmail.com> wrote:
>I have a grid data which has values of a variable (e.g: Temperature).
>My
>data has 6069 data points where each data point refers to different
>latitude and longitude. I want to transform this data to a raster file
>so
>that I can clip it according to a shapefile that has much smaller
>boundaries than the raster ( actually the shapefile basins fall inside
>the
>much larger raster file which covers the whole USA).
>
>Can I do it by R? I know that this can be done by ArcGIS but I want to
>do
>it with R.
>
>Please help me.
>
>TIA
>
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list