osm2pgsql

Converts OpenStreetMap data into a PostgreSQL database

brewmacoslinux
Try with needOr install directly
Source

About

OpenStreetMap data to PostgreSQL converter

Commands

osm2pgsql

Examples

Import OSM data file into PostgreSQL database$ osm2pgsql -d database_name -U postgres planet.osm
Import OSM data with custom style file and slim mode$ osm2pgsql -d gis -U postgres -S /path/to/style.lua --slim planet.osm.pbf
Update existing database with change file (diff)$ osm2pgsql -d gis -U postgres --append changes.osc.gz