osm_native: Coordinate helpers

View source: R/tile-math.R

osm_nativeR Documentation

Coordinate helpers

Description

Coordinate helpers

Usage

osm_native(x, y)

osm_lnglat(lng, lat)

osm_crs_native()

osm_ensure_lnglat(pt)

osm_ensure_native(pt)

Arguments

x, y

Ordinate values in EPSG:3857 (Spherical Mercator in meters)

lng, lat

Coordinate values for longitude/latitude in degrees.

pt

A vector of points as coerced by [wk::as_xy()]. The CRS for these points is considered.

Value

- 'osm_native()', 'osm_lnglat()', 'osm_ensure_native()', and 'osm_ensure_lnglat()' return a [wk::xy()] with the appropriate crs - 'osm_crs_native()' returns a value that can be used as the [wk::wk_crs()] of a vector.

Examples

osm_lnglat(-64, 45)
osm_ensure_native(osm_lnglat(-64, 45))
osm_ensure_lnglat(
  osm_ensure_native(osm_lnglat(-64, 45))
)

paleolimbot/rosm documentation built on Aug. 31, 2023, 7:35 p.m.