Transform Base Maps Using Log-Azimuthal Projection

Base maps are transformed to focus on a specific location using an azimuthal logarithmic distance transformation.


fisheye

CRAN version codecov R-CMD-check

The goal of fisheye is to create base maps focusing on a specific location using an azimuthal logarithmic distance transformation.

Installation

You can install the released version of fisheye from CRAN with:

install.packages("fisheye")

Alternatively, you can install the development version of fisheye from GitHub with:

remotes::install_github("riatelab/fisheye")

Example

This is a basic example:

library(sf)
#> Linking to GEOS 3.11.1, GDAL 3.6.2, PROJ 9.1.1; sf_use_s2() is TRUE
library(fisheye)
library(mapsf)
# Import dataset
ncraw <- st_read(system.file("shape/nc.shp", package="sf"), quiet = TRUE)
nc <- st_transform(ncraw, 3857)
par(mfrow = c(1,2))
mf_map(nc, col ="grey90")
mf_map(nc[51, ], add = TRUE, col = "grey40")
mf_title("Original Map")
# transform the basemap
nc_fe  <- fisheye(nc, centre = nc[51, ])
mf_map(nc_fe, col ="grey90")
mf_map(nc_fe[51, ], add = TRUE, col = "grey40")
mf_title("Log-Azimuthal Projection")

See a more detailed example here:

References

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("fisheye")

0.2.0 by Timothée Giraud, 3 years ago


https://github.com/riatelab/fisheye


Report a bug at https://github.com/riatelab/fisheye/issues


Browse source code at https://github.com/cran/fisheye


Authors: Timothée Giraud [cre, aut] , Luc Guibard [aut]


Documentation:   PDF Manual  


GPL-3 license


Imports sf

Suggests covr, tinytest


See at CRAN