↑ OpenStreetmap Hacker's guide ↑↑ Net & Web  

Geoinformation data sources and file formats

OpenStreetmap data -- Shapefiles -- Elevation data -- Rendered maps

OpenStreetmap database files

Servers

OpenStreetmap XML file format

An XML-based format containing map objects and metadata. Common XML tags and attributes:

osm
This top-level tag encloses the whole file. Attributes:
version: Format version ? Usually 0.6
generator: Program that created this file
bounds
Latitude / longitude range of rectangular region. Can occur within osm tag, usually at the start of the file. Attributes: minlat, minlon, maxlat, maxlon. Empty tag.
node
Represents a node, a point-like map feature. Empty tag unless metadata tags are present. Attributes:
id: Unique map object ID. Negative for nodes newly created in editor such as JOSM.
lat, lon: Latitude and longitude of node
version: Revision of this node ?
timestamp, uid, user, changeset: Time, author and changeset of last modification
action: For objects edited with JOSM: "modified" for new and modified nodes, "delete" for deleted nodes
way
Represents a way / path. Contains nd sub-tags referencing nodes that are part of the way. For closed ways, the last nd tag is the same as the first. Attributes:
id: Unique map object ID. Negative for ways newly created in editor such as JOSM.
version: Revision of this way ?
timestamp, uid, user, changeset: Time, author and changeset of last modification
action: For objects edited with JOSM: "modified" for new and modified ways, "delete" for deleted ways
nd
Node reference within way tag. Attribute ref contains the ID of the node. Empty tag.
relation
Represents a relation, i.e. a set of other objects. Contains member sub-tags referencing its elements. Can have the same attributes as way.
member
Reference to sub-object within relation tag. Empty tag. Attributes:
type: Type of member object: "node", "way" or "relation"
ref: ID of member object
role: Meaning of member object — valid values depend on the type of relation. For example, for multipolygons (regions with holes), the role "outer" indicates the member is part of the outline, the role "inner" that it is part of the boundary of a hole.
tag
Metadata tag occurring within node, way or relation. Attributes k for key, v for value. Empty tag.

ERSI shape files

Shape file downloads

Shape file format documentation

The shapefile format was designed by a committee: Some liked little-endian storage, but some preferred big-endian, so some data in the file format are little-endian and some big-endian. All data in the file is either 32-bit integers or double precision floating point. But some committe members liked 16-bit numbers, so the lengths of the whole file and of records in the file are given in units of 16-bit words. And apparently someone liked bytes too, so field offsets in the specification are given in bytes.

Tools

Elevation data

Servers

File formats

The .hgt file format is documented here and briefly described on this page.

Tools

The GDAL library and utilities allow all kinds of processing of raster geodata.

Rendered maps

Some mapping authorities are offering complete map sheets for download.

Servers

File formats


Licensed under the Creative Commons Attribution-Share Alike 3.0 Germany License