View source: R/osmapi_elements.R
osm_update_object | R Documentation |
Updates data from a preexisting element.
osm_update_object(x, changeset_id)
x |
The new object data. Can be the path of an xml file, a xml2::xml_document or a data.frame inheriting
or following the structure of an |
changeset_id |
The ID of an open changeset where to create the object. If missing, |
A full representation of the element as it should be after the update has to be provided. Any tags, way-node refs, and relation members that remain unchanged must be in the update as well. A version number must be provided as well, it must match the current version of the element in the database.
If x
is a data.frame, the columns type
, id
, visible
, version
, changeset
, and tags
must be present +
column members
for ways and relations + lat
and lon
for nodes. For the xml format, see the
OSM wiki.
If multiple elements are provided only the first is updated. The rest is discarded.
Returns the new version number of the object.
This updates the bounding box of the changeset.
To avoid performance issues when updating multiple objects, the use of the osm_diff_upload_changeset()
is highly
recommended. This is also the only way to ensure that multiple objects are updated in a single database
transaction.
Other edit OSM objects' functions:
osm_create_object()
,
osm_delete_object()
vignette("how_to_edit_osm", package = "osmapiR")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.