osmchange_delete | R Documentation |
osmchange
to delete existing OSM objectsPrepare data to delete OSM objects.
osmchange_delete(x, delete_if_unused = FALSE, format = c("R", "osc", "xml"))
x |
A osmapi_objects or |
delete_if_unused |
If |
format |
Format of the output. Can be |
If if-unused
attribute is present, then the delete operation(s) in this block are conditional and will only be
executed if the object to be deleted is not used by another object. Without the if-unused
, such a situation would
lead to an error, and the whole diff upload would fail. Setting the attribute will also cause deletions of already
deleted objects to not generate an error.
If format = "R"
, returns a osmapi_OsmChange
data frame with one OSM edition per row.
If format = "osc"
or format = "xml"
, returns a xml2::xml_document following the
OsmChange format that can be saved with xml2::write_xml()
and
opened in other applications such as JOSM.
The results are ready to send the editions to the servers with osm_diff_upload_changeset()
.
Other OsmChange's functions:
osm_diff_upload_changeset()
,
osm_download_changeset()
,
osmchange_create()
,
osmchange_modify()
obj_id <- osmapi_objects(data.frame(
type = c("way", "way", "relation", "node"),
id = c("722379703", "629132242", "8387952", "4739010921")
))
osmchange_del <- osmchange_delete(obj_id)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.