简体   繁体   中英

cutting of raster image to selected extent?

I have taken raster images from worldclim and I want to cut this raster image to Canada latitude and longitude (42,83, 53,141). I am new user in R so can anyone tell me how I cut this on R.

You can use crop() function from the package raster :

library(raster)
canada_cropped = crop(x = full_raster_image, y = your_extension)

Here x can be your raster image that you want to crop from, and y is the extent object (or an object you can extract from).

I would recommend using ?raster::crop where you can learn a lot more about this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM