osm_history_object {osmapiR} | R Documentation |
Get the history of an object
Description
Retrieves all old versions of an object from OSM.
Usage
osm_history_object(
osm_type = c("node", "way", "relation"),
osm_id,
format = c("R", "xml", "json"),
tags_in_columns = FALSE
)
Arguments
osm_type |
Object type ( |
osm_id |
Object id represented by a numeric or a character value. |
format |
Format of the output. Can be |
tags_in_columns |
If |
Value
If format = "R"
, returns a data frame with a version of the OSM object per row. If format = "xml"
, returns a
xml2::xml_document following the
OSM_XML format. If format = "json"
,
returns a list with a json structure following the OSM_JSON format.
See Also
Other get OSM objects' functions:
osm_bbox_objects()
,
osm_get_objects()
,
osm_relations_object()
,
osm_ways_node()
,
osmapi_objects()
Examples
## Not run:
node <- osm_history_object(osm_type = "node", osm_id = 35308286)
node
way <- osm_history_object(osm_type = "way", osm_id = 13073736L)
way
rel <- osm_history_object(osm_type = "relation", osm_id = "40581")
rel
## End(Not run)