OSM Data Structure#
Changesets#
Changesets are another important concept in OSM and can be very useful when filtering OSM data for specific contributors or mapping campaigns. Whenever somebody changes something in the OpenStreetMap database these changes are first bundled into a changeset, similar to how you group changes in a git commit. Again, it’s always useful to check the Wiki.
“A changeset consists of a group of changes made by a single user over a short period of time. One changeset may for example include the additions of new elements to OSM, the addition of new tags to existing elements, changes to tag values of elements, deletion of tags and also deletion of elements.”
This example shows the common metadata available for changesets such as timestamps, bounding box coordinates and user id. Many changesets have a specific comment
tag. During mapping campaigns this is often used to provide more information on the purpose of the mapping. But also in general this comment can provide contextual information on the map edits. Further useful information is provided about the mapping software (created_by
). Check here for more details: https://www.openstreetmap.org/changeset/124703880
<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6" generator="CGImap 0.8.8 (1985848 spike-07.openstreetmap.org)" copyright="OpenStreetMap and contributors" attribution="http://www.openstreetmap.org/copyright" license="http://opendatacommons.org/licenses/odbl/1-0/">
<changeset id="124703880" created_at="2022-08-09T21:14:57Z" closed_at="2022-08-09T21:14:59Z" open="false" user="DaryaSea" uid="14174743" min_lat="30.3525220" min_lon="48.2833660" max_lat="30.3583001" max_lon="48.2951977" comments_count="0" changes_count="16">
<tag k="source" v="Bing aerial imagery"/>
<tag k="hashtags" v="#adt"/>
<tag k="created_by" v="JOSM/1.5 (18463 en)"/>
<tag k="comment" v="Adjusted the building geometry ردیف B13 in Khuzestan #adt"/>
</changeset>
</osm>
Changesets can also be queried by it’s bounding box. This can be useful for geospatial analysis of changesets that cover only a specific area.
Quick-Exercise
Explore the most recent changes in OSM and their location through OSM in Realtime. Click on the changeset comment on the right side and inspect what has been changed in the given changeset.