View source: R/configure_inset.R
| configure_inset | R Documentation |
The configuration returned by this function will often be passed to the
coordinate system via coord_sf_inset() so that it is propagated to all
relevant layers.
configure_inset(
shape,
scale = NULL,
translation = NULL,
units = "km",
crs_working = NULL,
centre = deprecated(),
radius = deprecated()
)
shape |
Inset shape: see |
scale |
Zoom scale: values larger than one will make the inset bigger. |
translation |
Translation (shift) of the inset relative to the centre.
This can be an |
units |
Base length unit (e.g. |
crs_working |
The coordinate reference system to use internally when applying the transformations. See Details. |
centre, radius |
The default crs_working uses the equidistant cylindrical coordinate
reference system with the latitude of true scale set to match the latitude of
centre. This ensures that circular insets will appear circular in most
cases since the projection is not distorted near the centre. The geometries
are converted to this CRS for the inset transformation and constructing the
inset frame, and are converted back to the CRS of centre at the end.
The default units are kilometres but can be changed with units
instead of specifying the whole projection. The possible values for
units are
those understood by proj:
"mm": millimetre
"cm": centimetre
"m": metre
"ft": foot
"us-ft": US survey foot
"fath": fathom
"kmi": nautical mile
"us-ch": US survey chain
"us-mi": US survey mile
"km": kilometre
"ind-ft": Indian foot (1937)
"ind-yd": Indian yard (1937)
"mi": Statute mile
"yd": yard
"ch": chain
"link": link
"US": yard 0.914401828803658 Yard_US
"Decimeter": Decimeter
"International": 0.0254 Inch
"US": inch 0.0254000508001016 Inch_US
"International": 5.0292 Rod
"US": rod 5.02921005842012 Rod_US
"US": mile (pre-1954) 1853.248
"Nautical_Mile_US":
"UK": mile (pre-1970) 1853.184
"Nautical_Mile_UK":
"Height": Oliver Smoot, used
"to": the Harvard Bridge
"1.7018":
"Old": unit of distance
"used": Texas (33 1/3
"US": 0.846668360003387 Vara_TX
"Desktop": Point (1/72 of
"an": inch) 0.000352777777777778 Point
"Micrometer": Micrometer
"Nanometer": Nanometer
"50": length 50000 50_Kilometers
"150": length 150000 150_Kilometers
"dm": decimeter
"in": inch
"ind-ch": Indian chain
"us-in": US survey inch
"us-yd": US survey yard
An inset configuration object of class inset_config.
library(sf)
# circular inset with a 2x enlargement
cfg <- configure_inset(
shape_circle(centre = c(-82, 35), radius = 50),
scale = 2,
translation = c(70, -180),
units = "mi"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.