View source: R/vis-make_transition.r
scale_meters_to_degrees | R Documentation |
Get degree-scale equivalent of meter-scale distance on an sf
object.
scale_meters_to_degrees(x, sf, ref = "center", epsg = 3175)
x |
Distance, in meters (or units of |
sf |
An |
ref |
Reference point for scale. If |
epsg |
Code denoting coordinate reference system in which calculations are made. Must be a Cartesian projection. |
A helper function to determine input resolution to
make_transition()
.
A two-element vector with distance in x and y (longitude and latitude) dimensions, respectively.
# how many long, lat equal to 5000 m at center of great_lakes_polygon?
scale_meters_to_degrees(
x = 5000,
sf = great_lakes_polygon
)
# how many long, lat equal to 5000 m at top of great_lakes_polygon?
scale_meters_to_degrees(
x = 5000,
sf = great_lakes_polygon,
ref = "max"
)
# how many long, lat equal to 5000 m at bottom of great_lakes_polygon?
scale_meters_to_degrees(
x = 5000,
sf = great_lakes_polygon,
ref = "min"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.