Skip to content
nvkelso edited this page Jul 10, 2012 · 5 revisions

#Usage:

This will create a series of tables in your PostGIS database that you can then access from Mapnik.

osm2pgsql -smucK new-york.osm.bz2  -S default.style -U osm -d planet_osm

Where:

osm2pgsql - the command

-smucK - the options: slim, mercator projection, uft-8 text encoding, create a new table (remove old if present; use a to append instead), and Keep coastlines

new-york.osm.bz2 - the data file

-S default.style - the style file with flag

-U osm - which user to access PostGIS

-d planet_osm - which datatable space to store in PostGIS

#Gotcha's

You'll need a -S style file, available from OSM's Trac:

https://trac.openstreetmap.org/browser/applications/utils/export/osm2pgsql/default.style

Clone this wiki locally