[R-sig-Geo] Calculating area of region with a raster

Anthony Fischbach afischbach at usgs.gov
Thu May 17 00:56:43 CEST 2012


Rhys,
using the NASA special sensor microwave imagery sea ice data set with its
constant area pixel 
(PixelArea = 25x25 ## in km) geometry I was able to solve this problem by
creating a raster with pixel values = 1 for pixels with ice and NA for
pixels without ice then I summed the values and multiplied by the PixelArea.
sum(values(raster.Ice), na.rm=T)* PixelArea
hth-

-----
Tony Fischbach, Wildlife Biologist
Walrus Research Program
Alaska Science Center
U.S. Geological Survey
4210 University Drive
Anchorage, AK 99508-4650

AFischbach at usgs.gov
http://alaska.usgs.gov/science/biology/walrus
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Calculating-area-of-region-with-a-raster-tp7561970p7562866.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list