Learn R Programming

IsoriX (version 0.7)

OceanMask: Mask of world oceans

Description

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

Arguments

Format

A SpatialPolygons object

See Also

CountryBorders for another polygon shapefile used to embellish the plots

Examples

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

## How did we create this file?

if(require(raster) & require(rgeos)){
    worldlimit <- as(extent(CountryBorders), "SpatialPolygons")
    proj4string(worldlimit) <- crs(CountryBorders)
    OceanMask <- gDifference(worldlimit, CountryBorders)  
    OceanMask
    
## Uncomment the following to store the file as we did
#save(OceanMask, file = "OceanMask.rda", compress = "xz")

}


# }

Run the code above in your browser using DataLab