JOSM file format

From OpenStreetMap Wiki
Jump to: navigation, search
Help
Available languages
English Français Italiano

The JOSM file format is used by JOSM if and when the user saves/loads data to file. JOSM files have the .osm extension, and the format looks very much like a Planet.osm extracts or the result of a map call from the server, with a few additions. It is both a storage format and a change file format, so in addition to storing data downloaded from the server it can also represent changes made by the user since downloading.

Example

<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.5' generator='JOSM'>
  <bounds minlat='51.5076478723889' minlon='-0.127989783553507' maxlat='51.5077445145483' maxlon='-0.127774884645096' origin='OpenStreetMap server' />
  <node id='26821100' timestamp='2009-02-16T21:34:57+00:00' user='dankarran' visible='true' lat='51.5077286' lon='-0.1279688'>
    <tag k='created_by' v='Potlatch 0.10f' />
    <tag k='name' v='Nelson&apos;s Column' />
    <tag k='tourism' v='attraction' />
    <tag k='monument' v='statue' />
    <tag k='historic' v='monument' />
  </node>
  <node id='-1' visible='true' lat='51.507661490456606' lon='-0.1278000843634869' />
  <node id='346364767' action='delete' timestamp='2009-02-16T21:34:44+00:00' user='dankarran' visible='true' lat='51.5076698' lon='-0.1278143' />
</osm>

The format looks almost exactly like the output from the server, with a few small changes:

Unlike some other change file formats the order of the entities is by type rather than in the actual order of the changes. The result is another self-consistant file, so it will always be possible to reorder the changes in such a way that referential integrity is preserved.

usage and intended use

The JOSM file-format is intended for the following types of clients:

it is not intended for

it is optimized for:

This protocol is supported by the following clients:

Personal tools
Namespaces
Variants
Actions
site
Toolbox