OSM XML — Multipolygon Relation With Outer and Inner Ways
Wither Lake and its island as an OSM multipolygon relation: two closed ways tagged separately and joined by a relation whose members carry outer and inner roles. OSM has no polygon primitive at all, so reconstructing the hole means reading the relation rather than the ways.
<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6" generator="Novus Examples geospatial fixtures">
<bounds minlat="46.95" minlon="-12.64" maxlat="47.14" maxlon="-12.36"/>
<node id="-1" lat="47.04" lon="-12.52"/>
<node id="-2" lat="47.04" lon="-12.495"/>
<node id="-3" lat="47.053" lon="-12.488"/>
<node id="-4" lat="47.061" lon="-12.506"/>
<node id="-5" lat="47.052" lon="-12.529"/>
<node id="-6" lat="47.048" lon="-12.51"/>
<node id="-7" lat="47.0525" lon="-12.511"/>
<node id="-8" lat="47.053" lon="-12.504"/>
<node id="-9" lat="47.047" lon="-12.503"/>
<way id="-101">
<nd ref="-1"/>
<nd ref="-2"/>
<nd ref="-3"/>
<nd ref="-4"/>
<nd ref="-5"/>
<nd ref="-1"/>
<tag k="natural" v="water"/>
</way>
<way id="-102">
<nd ref="-6"/>
<nd ref="-7"/>
<nd ref="-8"/>
<nd ref="-9"/>
<nd ref="-6"/>
<tag k="place" v="island"/>
</way>
<relation id="-201">
<member type="way" ref="-101" role="outer"/>
<member type="way" ref="-102" role="inner"/>
<tag k="type" v="multipolygon"/>
<tag k="natural" v="water"/>
<tag k="water" v="lake"/>
<tag k="name" v="Wither Lake"/>
</relation>
</osm>
Specifications
- Format
- OSM XML 0.6
- Nodes
- 9
- Ways
- 2
- Relations
- 1
- Member Roles
- outer, inner
- Identifiers
- negative (not-yet-uploaded convention)
- Encoding
- UTF-8
- Line Endings
- LF
Testing contract
Expected to pass- Scenario
- Convert the relation to a GeoJSON Polygon.
- Expected result
- One Polygon with an exterior and an interior ring is produced; a converter that reads only the ways emits two unrelated closed lines and loses the hole.
What is a .osm file?
An .osm file holds OpenStreetMap data in the project's XML schema. The document contains node, way, and relation elements, each with an id, version, and free-form tag children; ways reference their nodes in order, and relations reference members by type, id, and role. It is the format returned by the OSM API and by Overpass queries, and the input to most OSM-based routing and rendering toolchains.
How to use this file
Use an example .osm file to test OSM parsers, tag filters, and routing-graph builders, checking that way node ordering is preserved, that relation roles are read, and that referenced ids missing from the extract are reported rather than skipped silently.
How to use this file for testing
“OSM XML — Multipolygon Relation With Outer and Inner Ways” is a deterministic Novus Examples fixture for Geospatial, Conversion testing, Data import. GeoJSON, GPX, and KML files with points, lines, polygons, and tracks — for testing map tools, route parsers, and geo importers.
Documented properties for this file: 9 nodes · UTF-8 · LF. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.
Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.
Geospatial fixtures publish one invented territory across formats, with the coordinate reference system and feature counts documented in specs. Convert or reproject and diff against the twin in the same group; edge-case geometries state exactly which assumption they are built to break.
Related files
- gpkgGeoPackage — Aspatial Attributes Table (no geometry column)A GeoPackage holding an `attributes` table with no geometry at all — the standard's own answer to a lookup table you want to ship alongside your layers. Its gpkg_contents row has null bounds and a null SRS, which is what readers that assume every row is spatial trip over.

- gpkgGeoPackage — Three Feature Layers in One SQLite ContainerThe territory as an OGC GeoPackage: an ordinary SQLite database with the three required metadata tables and three feature layers whose geometry columns hold GeoPackage binary blobs. Unlike a shapefile it carries several geometry types, long column names and real typed columns in one file.

- gpxGPX — Route (rte) Rather Than a TrackA `rte` element: an ordered list of waypoints describing a planned route, with no timestamps because it has not been travelled yet. Many importers only look for `trk` and report this perfectly valid file as empty.

- gpxGPX — Standalone Waypoints OnlyFive `wpt` elements for the towns of the territory, with names, symbols and descriptions but no track or route. It is the GPX equivalent of a point layer, and the third of the three top-level GPX content types.

- osmKestrel Bay Territory — OpenStreetMap XML TwinThe towns and roads in OSM XML: tagged nodes, three highway ways sharing the junction node at Kestrel Bay, and a route relation over them. All object IDs are negative — the convention for objects that have never been uploaded — so nothing here can be mistaken for real OSM data.

- kmlKML — LineString Placemarks With tessellateThe three roads as LineString Placemarks with `tessellate` set, which tells a globe renderer to drape the line over terrain rather than drawing it as a straight chord. Converters that drop the flag produce lines that tunnel through hills.

Generated by generation/geospatial.py. Free for any use, no attribution required — license.