Learn R Programming

oce (version 0.9-18)

coastlineWorld: World coastline

Description

World coastline, in coarse resolution and with country boundaries

Usage

data(coastlineWorld)

Arguments

source

Downloaded from http://www.naturalearthdata.com, in ne_110m_admin_0_countries.shp. This procedure worked in July 2015 and also in October 2015, so it is likely to be reasonably stable, but be aware that webpages do tend to change.

Installing your own datasets

Follow the procedure along the lines described in Details, where of course your source file will differ. Also, you should change the name of the coastline object from coastlineWorld, to avoid conflicts with the built-in dataset. Save the .rda file to some directory of your choosing, e.g. perhaps /data/coastlines or ~/data/coastlines on a unix-type machine. Then, whenever you need the file, use load to load it. Most users find it convenient to do the loading in an Rprofile startup file.

Details

This is a coarse resolution coastline at scale 1:110M, with 10,696 points, suitable for world-scale plots plotted at a small size, e.g. inset diagrams. Finer resolution coastline files are provided in the ocedata package. The data set was created as follows.

  1. Visithttp://www.naturalearthdata.comand click thedownloadstab. Three data sets are provided. Choose the coarse one, labelled ``Small scale data, 1:110m.'' ForcoastlineWorld, the link named ``Cultural'' was clicked, and this yields a new webpage. On this page, find the section named ``Admin 0 - Countries'' and select the link named ``Download countries.'' Now you will have a zip file on your machine.
  2. Locate and expand the newly-downloaded zip file.
  3. Run the following R code to read and save the coastlinelibrary(oce) coastlineWorld <- read.oce("ne_110m_admin_0_countries/ne_110m_admin_0_countries.shp") save(coastlineWorld, file="coastlineWorld.rda") library(tools) resaveRdaFiles("coastlineWorld.rda", compress="auto")

See Also

The ocedata package provides two more coastlines with better resolution: coastlineWorldMedium and coastlineWorldFine. The documentation for coastline-class explains the structure of coastline objects and discusses functions that deal with them.

The maps package provides a database named world that has 27221 points.