Learn R Programming

IsoriX (version 0.5)

oceanmask: Mask of world oceans

Description

This dataset contains a polygon shapefile that can be used to mask large bodies of water.

Usage

data(oceanmask)

Arguments

Format

A SpatialPolygons object

See Also

countries for another polygon shapefile used to embellish the plots

Examples

Run this code
# NOT RUN {
data(oceanmask)
if(require(sp))
    plot(oceanmask, col='blue')

## HOW DID WE CREATE THIS FILE?
## (This example takes some time and will therefore not be run
##  unless you type: example(oceanmask, run.dontrun=TRUE) )
  
# }
# NOT RUN {
if(require(raster) & require(rgeos)){
    worldlimit <- as(extent(countries), "SpatialPolygons")
    proj4string(worldlimit) <- crs(countries)
    oceanmask <- gDifference(worldlimit, countries)  
    oceanmask
    ## uncomment the following to store the file:
    #save(oceanmask, file="oceanmask.rda", compress="xz")
}
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab