Package: osmdata 0.4.0.9000

Joan Maspons

osmdata: Import 'OpenStreetMap' Data as Simple Features or Spatial Objects

Download and import of 'OpenStreetMap' ('OSM') data as 'sf' or 'sp' objects. 'OSM' data are extracted from the 'Overpass' web server (<https://overpass-api.de/>) and processed with very fast 'C++' routines for return to 'R'.

Authors:Joan Maspons [aut, cre], Mark Padgham [aut], Bob Rudis [aut], Robin Lovelace [aut], Maëlle Salmon [aut], Andrew Smith [ctb], James Smith [ctb], Andrea Gilardi [ctb], Enrico Spinielli [ctb], Anthony North [ctb], Martin Machyna [ctb], Marcin Kalicinski [ctb, cph], Eli Pousson [ctb]

osmdata_0.4.0.9000.tar.gz
osmdata_0.4.0.9000.zip(r-4.7)osmdata_0.4.0.9000.zip(r-4.6)osmdata_0.4.0.9000.zip(r-4.5)
osmdata_0.4.0.9000.tgz(r-4.6-x86_64)osmdata_0.4.0.9000.tgz(r-4.6-arm64)osmdata_0.4.0.9000.tgz(r-4.5-x86_64)osmdata_0.4.0.9000.tgz(r-4.5-arm64)
osmdata_0.4.0.9000.tar.gz(r-4.7-arm64)osmdata_0.4.0.9000.tar.gz(r-4.7-x86_64)osmdata_0.4.0.9000.tar.gz(r-4.6-arm64)osmdata_0.4.0.9000.tar.gz(r-4.6-x86_64)
osmdata_0.4.0.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
osmdata/json (API)

# Install 'osmdata' in R:
install.packages('osmdata', repos = c('https://ropensci.r-universe.dev', 'https://cloud.r-project.org'))

Reviews:rOpenSci Software Review #103

Bug tracker:https://github.com/ropensci/osmdata/issues

Pkgdown/docs site:https://docs.ropensci.org

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

open0street0mapopenstreetmapoverpass0apiosmcpposm-dataoverpass-apipeer-reviewedcpp

15.22 score 339 stars 19 packages 4.0k scripts 11k downloads 2 mentions 32 exports 27 dependencies

Last updated from:b9b1ae737a (on main). Checks:14 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK223
linux-devel-x86_64OK185
pkgdown docsOK254
source / vignettesOK276
linux-release-arm64OK177
linux-release-x86_64OK188
macos-release-arm64OK145
macos-release-x86_64OK407
macos-oldrel-arm64OK120
macos-oldrel-x86_64OK276
windows-develOK183
windows-releaseOK199
windows-oldrelOK381
wasm-releaseOK143

Exports:add_osm_featureadd_osm_featuresavailable_featuresavailable_tagsbbox_to_stringfilter_osm_userget_overpass_urlgetbbopqopq_aroundopq_csvopq_enclosingopq_osm_idopq_stringosm_elevationosm_linesosm_multilinesosm_multipolygonsosm_pointsosm_poly2lineosm_polygonsosmdataosmdata_data_frameosmdata_scosmdata_sfosmdata_sposmdata_xmloverpass_statusset_overpass_urltrim_osmdataunique_osmdataunname_osmdata_sf

Dependencies:askpassclicurlgluehttrhttr2jsonlitelifecyclemagrittrmimeopensslpillarpkgconfigR6rappdirsRcpprlangrvestselectrstringistringrsystibbleutf8vctrswithrxml2

osmdata
1. Introduction | 1.1 Bounding boxes: the getbb() function | 2. The overpass API | 2.1. osmdata queries | 2.2 Extracting OSM data from a query | 2.3. Query example | 3. The osmdata object | 3.1. The osmdata_xml() function | 3.2. The osmdata_sf() function | 3.3. The osmdata_sp() function | 4. Recursive searching | 4.1. Example | 4.2 Relation example | 5. Additional Functionality | 6. Related Packages | 7. References

Last update: 2025-06-16
Started: 2017-02-12

Elevation data and OSM: The osmdata_sc function
1. Introduction | 2. Elevation Data | Example usage of elevation data

Last update: 2025-06-11
Started: 2019-04-25

Translation of OSM to Simple Features
1. OpenStreetMap Data Structure | 2. Simple Features Data Structure | 3. How osmdata translates OSM into Simple Features | 3.1. OSM Nodes | 3.2. OSM Ways | 3.3 OSM Relations | 3.3(a) Multipolygon Relations | 3.3(b) Multilinestring Relations | 4. GDAL Translation of OSM into Simple Features | 4.1. OSM Nodes | 4.2. OSM Ways | 4.3 OSM Relations | 4.3(a) Multipolygon Relations | 4.3(b) Multilinestring Relations | 5 Examples | 5.1 Routing | 5.1(a) Routing with sf/GDAL | 5.1(b) Routing with osmdata

Last update: 2025-06-11
Started: 2017-01-19

Splitting large queries
1. Introduction | 2. Query splitting | 3. Automatic bbox splitting

Last update: 2022-08-18
Started: 2022-01-23

Readme and manuals

Help Manual

Help pageTopics
Add a feature to an Overpass queryadd_osm_feature
Add multiple features to an Overpass queryadd_osm_features
List recognized features in OSMavailable_features
List tags associated with a featureavailable_tags
Convert a named matrix or a named or unnamed vector or data.frame to a stringbbox_to_string
Add an user filter to an Overpass queryfilter_osm_user
get_overpass_urlget_overpass_url
Get bounding box for a given place namegetbb
Build an Overpass queryopq
opq_aroundopq_around
Transform an Overpass query to return the result in a csv formatopq_csv
opq_enclosingopq_enclosing
Add a feature specified by OSM ID to an Overpass queryopq_osm_id
Convert an overpass query into a text stringopq_string opq_to_string
osm_elevationosm_elevation
Extract all 'osm_lines' from an 'osmdata_sf' objectosm_lines
Extract all 'osm_multilines' from an 'osmdata_sf' objectosm_multilines
Extract all 'osm_multipolygons' from an 'osmdata_sf' objectosm_multipolygons
Extract all 'osm_points' from an 'osmdata_sf' objectosm_points
Convert osmdata polygons into linesosm_poly2line
Extract all 'osm_polygons' from an 'osmdata_sf' objectosm_polygons
osmdata class defosmdata
Return an OSM Overpass query as a data.frame object.osmdata_data_frame
Return an OSM Overpass query as an 'osmdata_sc' object in 'silicate' ('SC') format.osmdata_sc
Return an OSM Overpass query as an osmdata object in 'sf' format.osmdata_sf
DEPRECATED: Return an OSM Overpass query as an osmdata object in 'sp' format.osmdata_sp
Return an OSM Overpass query in XML format Read an (XML format) OSM Overpass response from a string, a connection, or a raw vector.osmdata_xml
Retrieve status of the Overpass APIoverpass_status
set_overpass_urlset_overpass_url
trim_osmdatatrim_osmdata
unique_osmdataunique_osmdata
unname_osmdata_sfunname_osmdata_sf