mregions
- Get data from https://www.marineregions.org
Some data comes from the Flanders Marine Institute (VLIZ) geoserver
mregions
is useful to a wide diversity of R users because you get access to all of the data MarineRegions has, which can help in a variety of use cases:
Development version
Get region
Get helper library
Plot data
library('leaflet')
leaflet() %>%
addProviderTiles(provider = 'OpenStreetMap') %>%
addGeoJSON(geojson = res1$features) %>%
setView(-3.9, 35, zoom = 10)
Get region
Get helper library
Plot data
library('leaflet')
leaflet() %>%
addProviderTiles(provider = 'OpenStreetMap') %>%
addPolygons(data = res2)
From geojson
res3 <- mr_geojson(key = "Morocco:dam")
mr_as_wkt(res3, fmt = 5)
#> [1] "MULTIPOLYGON (((41.573732 -1.659444, 45.891882 ... cutoff
From shp object (SpatialPolygonsDataFrame
) or file, both work
mr_as_wkt(mr_shp(key = "MarineRegions:eez_iho_union_v2"))
#> [1] "GEOMETRYCOLLECTION (POLYGON ((-7.25 ... cutoff
mregions
in R doing citation(package = 'mregions')