Writes a GeoPackage (<prefix>.gpkg, EPSG:4326) with the layers M,
M_automatic, expert_additions and corridors (when present) and
records (thinned records with their cluster), plus <prefix>_report.csv,
<prefix>_connectivity.csv (clusters by linking distance),
<prefix>_links.csv (spanning-tree links), and the previews
<prefix>_map.png and <prefix>_links.png. For m_scenarios(), each
scenario is a layer and the comparison table is written.
Arguments
- x
An
m_areaorm_scenariosobject.- dir
Output folder (created if needed).
- prefix
File name prefix.
- raster
Optional raster for land areas in the report (see
m_report()).- land
Optional land polygons for the map background.
Examples
sim <- simulate_enm_data(seed = 1, n_presence = 150)
m <- delimit_m(sim$presence, link_km = 120, thin_km = 5)
f <- write_m_area(m, tempdir(), "M_example")
basename(f)
#> [1] "M_example.gpkg" "M_example_report.csv"
#> [3] "M_example_connectivity.csv" "M_example_links.csv"
#> [5] "M_example_map.png" "M_example_links.png"
