osmdata | R Documentation |
Imports OpenStreetMap (OSM) data into R as 'sf', 'SC', 'sp', 'data.frame' or 'xml_document' objects. OSM data are extracted from the overpass API and processed with very fast C++ routines for return to R. The package enables simple overpass queries to be constructed without the user necessarily understanding the syntax of the overpass query language, while retaining the ability to handle arbitrarily complex queries. Functions are also provided to enable recursive searching between different kinds of OSM data (for example, to find all lines which intersect a given point).
osmdata(
bbox = NULL,
overpass_call = NULL,
meta = NULL,
osm_points = NULL,
osm_lines = NULL,
osm_polygons = NULL,
osm_multilines = NULL,
osm_multipolygons = NULL
)
bbox |
bounding box |
overpass_call |
overpass_call |
meta |
metadata of overpass query, including timestamps and version numbers |
osm_points |
OSM nodes as sf Simple Features Collection of points or sp SpatialPointsDataFrame |
osm_lines |
OSM ways sf Simple Features Collection of linestrings or sp SpatialLinesDataFrame |
osm_polygons |
OSM ways as sf Simple Features Collection of polygons or sp SpatialPolygonsDataFrame |
osm_multilines |
OSM relations as sf Simple Features Collection of multilinestrings or sp SpatialLinesDataFrame |
osm_multipolygons |
OSM relations as sf Simple Features Collection of multipolygons or sp SpatialPolygonsDataFrame |
getbb: Get bounding box for a given place name
bbox_to_string: Convert a named matrix or a named vector (or an unnamed vector) return a string
overpass_status: Retrieve status of the overpass API
opq: Build an overpass query
add_osm_feature: Add a feature to an overpass query
opq_string: Convert an osmdata query to overpass API string
available_features: List recognised features in OSM
available_tags: List tags associated with a feature
osmdata_data_frame: Return OSM data in data.frame
format
osmdata_sc: Return OSM data in silicate format
osmdata_sf: Return OSM data in sf format
osmdata_sp: Return OSM data in sp format
osmdata_xml: Return OSM data in xml2 format
osm_points
: Extract all osm_points
objects
osm_lines
: Extract all osm_lines
objects
osm_polygons
: Extract all osm_polygons
objects
osm_multilines
: Extract all osm_multilines
objects
osm_multipolygons
: Extract all osm_multipolygons
objects
Class constructor should never be used directly, and is only exported to provide access to the print method
Mark Padgham, Bob Rudis, Robin Lovelace, Maëlle Salmon, Joan Maspons
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.