Description Usage Arguments Value Examples
Crop shorelines, dealing with crossing of the date line, and return a data.frame
1 | crop_shoreline(x, w = -180, e = 180, s = -90, n = 90)
|
x |
shoreline data, output by |
w, e, s, n |
coordinates of the region to crop. |
The shorelines as a data.frame, with columns lon and lat
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # NB: read a very reduced version of the data, for tests
shorepath <- system.file("extdata", ".", package="shoreliner")
w <- read_shoreline("c", 1, path=shorepath)
plot(w, max.plot=1)
head(crop_shoreline(w, -50, 50, -50, 50))
plot(crop_shoreline(w), type="l")
plot(crop_shoreline(w, -50, 50, -50, 50), type="l")
plot(crop_shoreline(w, -170, 170, -50, 50), type="l")
plot(crop_shoreline(w, 140, 290, -50, 0), type="l")
plot(crop_shoreline(w, -200, -140, 40, 90), type="l")
## Not run:
ggplot(crop_shoreline(w, 140, 290, -50, 0)) +
geom_polygon(aes(lon, lat)) + coord_map()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.