read.coastline(file, type=c("R","S","mapgen","shapefile","openstreetmap"),
debug=getOption("oceDebug"), monitor=FALSE, processingLog)
read.coastline.shapefile(file, lonlim=c(-180,180), latlim=c(-90,90),
debug=getOption("oceDebug"), monitor=FALSE, processingLog)
read.coastline.openstreetmap(file, lonlim=c(-180,180), latlim=c(-90,90),
debug=getOption("oceDebug"), monitor=FALSE, processingLog)
"R"
, "S"
, "mapgen"
,
"shapefile"
or "openstreetmap"
.latlim
, but a signed longitude.The MapGen format is of the form # -b -16.179081 28.553943 -16.244793 28.563330 BUG: the 'arc/info ungenerate' format is not yet understood.
Information about Canadian coastlines in ``shapefile'' format is provided
at
coastline-class
explains the
structure of coastline objects, and also outlines the other functions
dealing with them.library(oce)
cl <- read.coastline("7404.dat")
# If no plot yet:
plot(cl)
# To add to an existing plot:
lon <- longitude(cl)
lat <- latitude(cl)
lines(lon, lat)
# Note: another trick is to do something like the following,
# to get issues of whether longitude is defined in (-180,180)
# or (0,360)
lines(lon, lat)
lines(lon-360, lat)
Run the code above in your browser using DataLab