Render a complete planisphere from a projected object created with project().
The display includes the projected sphere outline, graticule, and geographic features.
Arguments
- x
A list returned by
project(), containing threesfobjects:basemap: projected geographic featuressphere: outline of the projected globegraticule: projected latitude/longitude grid
- title
Character string. Optional title to add to the plot. Default is NULL.
- extent
object. A spatial extent used to clip or define the mapping area (`sf`, `sfc`, or `bbox`).
Details
The visualization follows the D3.js spherical projection model used in the package. The rendering order is: 1. Sphere background 2. Graticule 3. Projected landmass (basemap) 4. Sphere outline
All geometries are expected to be already projected in spherical coordinates. This function is intended for fast visualization and exploration of D3-based projections.
Examples
library(sf)
#> Linking to GEOS 3.12.1, GDAL 3.8.4, PROJ 9.4.0; sf_use_s2() is TRUE
world <- st_read(
system.file("gpkg/land.gpkg", package = "planisphere"),
quiet = TRUE
)
result <- planisphere::project(
x = world,
proj = "Eckert1",
additional_layers = TRUE
)
planisphere::display(result)