OpenStreetMap Dataset
This page describes how to use the OpenStreetMap dataset in testing.
Database Schema
The database schema is available here. To import:
mysqladmin create osm
cat osmdb06.sql | mysql osmBy 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.sql30 tables are created.
Data
The data is provided in the form of XML files (.OSM files) that require the Java-based Osmosis tool to load into MariaDB. The tool is available from dev.openstreetmap.org. Version 0.36 is known to work.
Various .OSM files are available, including the entire world (>200Gb unzipped) and individual countries.
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
Last updated
Was this helpful?

