View source: R/osmapi_elements.R
osm_create_object | R Documentation |
Creates a new element in an open changeset as specified.
osm_create_object(x, changeset_id)
x |
The new object data. Can be the path to 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, |
If x
is a data.frame, the columns type
, changeset
, 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 created. The rest is discarded.
The ID of the newly created OSM object.
This updates the bounding box of the changeset.
The role
attribute for relations is optional. An empty string is the default.
To avoid performance issues when uploading multiple objects, the use of the osm_diff_upload_changeset()
is highly
recommended.
The version of the created object will be 1.
Other edit OSM objects' functions:
osm_delete_object()
,
osm_update_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.