Skip to main content

Posts

Showing posts from 2020

Importing OSM (PBF file) to PostGIS (PGSNAPSHOT schema)

OSM Data can be used for variety of usecases like rendering, searching, data analytics etc. Each usecase yield quickest result in a particular data format. Due to the large volume of data, this can cause significant difference in the response times.  Some of these formats are, PBF  -- A highly compressed format used almost exclusively for storage and downloads owing to the small sizes. These format are not human readable and gzip compressed. PostgreSQL with PostGIS extension -- A data format backed up by PostgreSQL database. There are various schemas supported for multiple use cases which can greatly impact the response time as indexes and normalization are used to speed up queries. Some popular schemas along with their usecase and certain features are as below. The table is taken directly from openstreetmap wiki. Schema name Created with Used by Primary use case Updatable Geometries ( PostGIS ) Lossless hstore  columns Database osm2pgsql osm2pgsql Mapnik ,  Kothic...