OpenStreetMap Dataset

Information on the standardized datasets and database dumps used for OpenStreetMap tests.

This page describes how to use the OpenStreetMap dataset in testing.

Database Schema

The database schema is available herearrow-up-right. To import:

mysqladmin create osm
cat osmdb06.sql | mysql osm

By default, this schema uses a mixture of InnoDB and MyISAM tables. To convert all tables to Aria:

sed -i -e 's/InnoDB/Aria/gi' osmdb06.sql
sed -i -e 's/MyISAM/Aria/gi' osmdb06.sql

30 tables are created.

Data

The data is provided in the form of XML files (.OSM files) that require the Java-based Osmosisarrow-up-right tool to load into MariaDB. The tool is available from dev.openstreetmap.orgarrow-up-right. Version 0.36 is known to work.

Various .OSM files are available, including the entire worldarrow-up-right (>200Gb unzipped) and individual countriesarrow-up-right.

Data is loaded with the following command-line (in the example, we're using the bulgaria.osm file, replace with the file you choose):

chmod +x bin/osmosis
bin/osmosis --read-xml file=bulgaria.osm --write-apidb dbType="mysql" host="localhost:port" validateSchemaVersion=no database="osm" user="root" password="<password-goes-here>"

Data is inserted into 19 tables, as follows:

This page is licensed: CC BY-SA / Gnu FDL

spinner

Last updated

Was this helpful?