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
- Natural Earth &emdash;
various shape file packages of physical features. Borders and inhabited
regions from this server are used by the OpenStreetmap default style.
- Continental shore lines are
available on an
OpenStreetmap server. These come without a .prj file giving the
coordinate system, but are in web mercator coordinates (EPSG 3857; as seen
in layer-shapefiles.xml of the old OpenStreetmap Mapnik style that uses
them).
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
- The ogr... programs from the GDAL toolkit can
process shape files. Try ogrinfo for
human-readable information extraction and
ogr2ogr for conversion.
- The standard file type identification program
file prints the record type and size
(in terms of 16-bit values) from the header of a shape file.
- This Perl script converts plain text files containing
coordinate pairs to shape files.
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
- Raster data is often in GeoTIFF format.
Single page GeoTIFF Spec 1.8.2 mirrored
here because the original server has vanished.
- Non-geoinformation file formats like PDF and PNG are also sometimes used.
Licensed under the Creative Commons Attribution-Share Alike 3.0 Germany License