Spatial annotations

Useful annotations that are frequently found on maps

annotation_north_arrow() GeomNorthArrow

Spatial-aware north arrow

north_arrow_orienteering() north_arrow_fancy_orienteering() north_arrow_minimal() north_arrow_nautical()

North arrow styles

fixed_plot_aspect()

Enforce a plot aspect ratio

annotation_scale() GeomScaleBar

Spatial-aware scalebar annotation

Spatial-enabled ggplot2 geometries

Use coordinate data with coord_sf()

geom_spatial_rect() geom_spatial_tile() StatSpatialRect StatSpatialTile

Projected rectangular regions

geom_spatial_segment() StatSpatialSegment

Spatial line segments

stat_spatial_identity() geom_spatial_point() geom_spatial_path() geom_spatial_polygon() geom_spatial_text() geom_spatial_label() geom_spatial_text_repel() geom_spatial_label_repel()

Spatial-aware ggplot2 layers

geom_polypath()

Polygons with holes in ggplot2

Layer functions

Convert spatial objects to ggplo2 layers

annotation_map_tile() GeomMapTile

Add background OSM tiles

layer_spatial(<Raster>) annotation_spatial(<Raster>) StatSpatialRaster StatSpatialRasterAnnotation StatSpatialRasterDf GeomSpatialRaster

Spatial ggplot2 layer for raster objects

layer_spatial() annotation_spatial() shadow_spatial()

Turn a spatial object into a ggplot2 layer

layer_spatial(<bbox>) annotation_spatial(<bbox>) shadow_spatial(<bbox>)

Add a bounding box to a map

layer_spatial(<stars>) annotation_spatial(<stars>) StatSpatialStars StatSpatialStarsAnnotation StatSpatialStarsDf GeomSpatialStars

Spatial ggplot2 layer for stars objects

annotation_spatial_hline() annotation_spatial_vline() GeomSpatialXline

Projected horizontal and vertical lines

Coordinate utilities

Extract and project coordinates from spatial objects

df_spatial()

Create a ggplot-friendly data frame from a spatial object

xy_transform()

Coordinate transform

Example data

Data used to demonstrate and test this package

load_longlake_data()

Load longlake test data