osm_redaction_object {osmapiR} | R Documentation |
Redact an object version
Description
Used by the Data Working Group to hide old versions of elements containing data privacy or copyright infringements. Only permitted for OSM accounts with the moderator role (DWG and server admins).
Usage
osm_redaction_object(
osm_type = c("node", "way", "relation"),
osm_id,
version,
redaction_id
)
Arguments
osm_type |
Object type ( |
osm_id |
Object id represented by a numeric or a character value. |
version |
Version of the object to redact. |
redaction_id |
If missing, then this is an unredact operation. If a redaction ID was specified, then set this element to be redacted in that redaction. |
Details
The redaction_id
is listed on https://www.openstreetmap.org/redactions. More information can be found in
the source.
Value
Nothing is returned upon successful redaction or unredaction of an object.
See Also
Other functions for moderators:
osm_delete_note()
,
osm_hide_comment_changeset_discussion()
Examples
## Not run:
## WARNING: this example will edit the OSM (testing) DB with your user!
# You will need a user with moderator role in the server to use `osm_redaction_object()`
set_osmapi_connection(server = "testing") # setting https://master.apis.dev.openstreetmap.org
x <- data.frame(type = "node", lat = 0, lon = 0, name = "Test redaction.")
obj <- osmapi_objects(x, tag_columns = "name")
changeset_id <- osm_create_changeset(
comment = "Test object redaction",
hashtags = "#testing;#osmapiR"
)
node_id <- osm_create_object(x = obj, changeset_id = changeset_id)
node_osm <- osm_get_objects(osm_type = "node", osm_id = node_id)
deleted_version <- osm_delete_object(x = node_osm, changeset_id = changeset_id)
redaction <- osm_redaction_object(
osm_type = node_osm$type, osm_id = node_osm$id, version = 1, redaction_id = 1
)
unredaction <- osm_redaction_object(osm_type = node_osm$type, osm_id = node_osm$id, version = 1)
osm_close_changeset(changeset_id = changeset_id)
## End(Not run)
[Package osmapiR version 0.1.0 Index]