Opensteetmap is the crowdsourced mapping of the planet and can be accessed at https://opensteetmap.org
The map data is freely downloadable and can be hosted locally for any purpose whatsoever under GPL license. Map data is downloadable in multiple archive formats like pbf (Protocolbuffer Binary Format) and others.
OSM's internal data model is represented as shown in the ER diagram above, but when it's imported from the PBF, it has to be efficient, fast and easy to use. Primarily, OSM databases can either be,
- Snapshot or
- Historical
Snapshot databases don't contain historical infromation (for instance, how a river changed it's course of the years or how landuse of a forested land changed over the year) whereas, Historical database contains this information. Naturally, historical databases are much more complex and requires more effort.
Various parameters on how to judge various data stores are,
- Updatability
- Transactibility
- Concurrent Read/Writability
- Snapshot/Historical ?
Few of the various data store usercases used by OSM community and developers are,
- API DB - This is the original PostgreSQL (not PostGIS) database running at the main OSM server.
- Updatable
- Full transaction support
- Full concurrent reads/writes
- Full historical data
- osm2pgsql - This is the primary datastore used by renderers like Mapnik.
- Updatable
- No transaction support
- Single writer/multiple reader
- Snapshot
- pgsnapshot - This is a popular schema generated by osmosis tool. It's mainly used for analysis.
- Updatable
- Snapshot
- Normatim - This is a schema used primarily for geocoding and searching. Generated by osm2pgsql
- Updatable
- Snapshot
It's important to choose datastore that is appropriate to the usecase, because GIS queries can be damn expensive especially when the records can be in multiple gigabytes.
Comments
Post a Comment