get_osm_data | R Documentation |
Wraps osmdata
functions to query OSM data by adjusted bounding box or
by enclosing ways/relations around the center of a location. timeout and
nodes_only parameters are not fully supported currently.
get_osm_data( location = NULL, dist = NULL, diag_ratio = NULL, unit = NULL, asp = NULL, key, value = NULL, features = NULL, crs = NULL, geometry = NULL, osmdata = FALSE, enclosing = NULL, nodes_only = FALSE, timeout = 120 ) get_osm_id(id, type = NULL, crs = NULL, geometry = NULL, osmdata = FALSE) get_osm_boundaries( location, level = NULL, lang = "en", crs = NULL, enclosing = "relation", geometry = NULL, osmdata = FALSE )
location |
A |
dist |
buffer distance in units. Optional. |
diag_ratio |
ratio of diagonal distance of area's bounding box used as
buffer distance. e.g. if the diagonal distance is 3000 meters and the
"diag_ratio = 0.1" a 300 meter will be used. Ignored when |
unit |
Units for buffer. Supported options include "meter", "foot", "kilometer", and "mile", "nautical mile" Common abbreviations (e.g. "km" instead of "kilometer") are also supported. Distance in units is converted to units matching GDAL units for x; defaults to "meter" |
asp |
Aspect ratio of width to height as a numeric value (e.g. 0.33) or
character (e.g. "1:3"). If numeric, |
key |
Feature key for overpass API query. |
value |
Value of the feature key; can be negated with an initial
exclamation mark, |
features |
Character vector of key-value pairs with keys and values enclosed in escape-formatted quotations (see examples). |
crs |
Coordinate reference system for output data; if |
geometry |
Geometry type to output ("polygons", "points", "lines",
"multilines", or "multipolygons"); if multiple geometry types are needed
set osmdata to |
osmdata |
If |
enclosing |
If enclosing is "relation" or "way", use the
|
nodes_only |
If |
timeout |
It may be necessary to increase this value for large queries, because the server may time out before all data are delivered. |
id |
OpenStreetMap feature id |
type |
type of feature with id; "node", "way", or "relation" |
level |
administrative level (admin_level) of boundary to return;
defaults to |
lang |
Language for boundary names to include in resulting data frame (e.g. "en" for English or "es" for Spanish). Default language names should always be included in results. Defaults to "en". See https://wiki.openstreetmap.org/wiki/Multilingual_names for more information. |
A simple feature object with features using selected geometry type or
an osmdata
object with features from all geometry types.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.