Maplint/XML Format

From OpenStreetMap Wiki
Jump to navigation Jump to search

When Maplint is run it adds several elements to the OSM XML file. All those elements are in the namespace http://maplint.openstreetmap.org/xml/1.0 and use the prefix maplint.

At the beginning of the OSM file right after the opening <osm> a <maplint:test/> element will be added for each test which was run on this file. This will look something like this:

 <maplint:test agent="xsltests" group="base" id="empty-tag-key" version="1" severity="error"/>
agent This is the program which added ran the test
id This is the id of the test
group Every test is in a group which is named here. This might be useful if you only want to run part of the tests
version A version number for this test
severity Severity of this test. Can be "error", "warning", or "notice"

Then later in the file, for each <node/>, <segment/>, or <way/> which fails a certain test, a <maplint:result/> element will be added. This will look something like this:

 <maplint:result ref="nodes-on-same-spot">Nodes: 25182824 25182841 25185062 25185067</maplint:result>

In this case this means that the nodes-on-same-spot test was run which detects if there are multiple nodes on the exact same spot. The ref attribute references back to the <maplint:test id="nodes-on-same-spot"/> element earlier. The text content of the result element is either empty or contains some additional information useful for printing in error reports. In this case the list of IDs of all node sharing the same location.