osmchange_delete {osmapiR} | R Documentation |
osmchange
to delete existing OSM objects
Description
Prepare data to delete OSM objects.
Usage
osmchange_delete(x, delete_if_unused = FALSE, format = c("R", "osc", "xml"))
Arguments
x |
A osmapi_objects or |
delete_if_unused |
If |
format |
Format of the output. Can be |
Details
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.
Value
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()
.
See Also
Other OsmChange's functions:
osm_diff_upload_changeset()
,
osm_download_changeset()
,
osmchange_create()
,
osmchange_modify()
Examples
## Not run:
obj_id <- osmapi_objects(data.frame(
type = c("way", "way", "relation", "node"),
id = c("722379703", "629132242", "8387952", "4739010921")
))
osmchange_del <- osmchange_delete(obj_id)
## End(Not run)