
Import OpenStreetMap data in 'sf', 'SC', 'sp', 'data.frame' and 'xml' formats
Source:R/osmdata-package.R
osmdata-package.Rd
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).
Functions to Prepare Queries
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
Functions to Get Additional OSM Information
available_features: List recognised features in OSM
available_tags: List tags associated with a feature
Functions to Extract OSM Data
osmdata_data_frame: Return OSM data in
data.frame
formatosmdata_sc: Return OSM data in silicate format
osmdata_sf: Return OSM data in sf format
osmdata_sp: Return OSM data in sp format (DEPRECATED)
osmdata_xml: Return OSM data in xml2 format
Functions to Search Data
osm_points
: Extract allosm_points
objectsosm_lines
: Extract allosm_lines
objectsosm_polygons
: Extract allosm_polygons
objectsosm_multilines
: Extract allosm_multilines
objectsosm_multipolygons
: Extract allosm_multipolygons
objects