osm_create_changeset {osmapiR}R Documentation

Create, update, or close a changeset

Description

Create, update, or close a changeset

Usage

osm_create_changeset(
  comment,
  ...,
  created_by = paste("osmapiR", getOption("osmapir.osmapir_version")),
  verbose = FALSE
)

osm_update_changeset(
  changeset_id,
  comment,
  ...,
  created_by = paste("osmapiR", getOption("osmapir.osmapir_version")),
  verbose = FALSE
)

osm_close_changeset(changeset_id)

Arguments

comment

Tag comment is mandatory.

...

Arbitrary tags to add to the changeset as named parameters (key = "value").

created_by

Tag with the client data. By default, ⁠osmapiR x.y.z⁠.

verbose

If TRUE, print the tags of the new changeset.

changeset_id

The id of the changeset to update. The user issuing this API call has to be the same that created the changeset.

Details

See https://wiki.openstreetmap.org/wiki/Changeset for details and the most common changeset's tags.

When updating a changeset, unchanged tags have to be repeated in order to not be deleted.

Value

The ID of the newly created changeset or a data.frame inheriting osmapi_changesets with the details of the updated changeset.

Nothing is returned upon successful closing of a changeset.

Functions

See Also

Other edit changeset's functions: osm_diff_upload_changeset()

Examples

## Not run: 
set_osmapi_connection("testing") # use the testing server

chset_id <- osm_create_changeset(
  comment = "Describe the changeset",
  source = "GPS;survey",
  hashtags = "#testing;#osmapiR"
)

chaset <- osm_read_changeset(changeset_id = chset_id)
chaset

upd_chaset <- osm_update_changeset(
  changeset_id = chset_id,
  comment = "Improved description of the changeset",
  hashtags = "#testing;#osmapiR"
)
upd_chaset

## End(Not run)

[Package osmapiR version 0.1.0 Index]