This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

[closed] How to Convert .OSM.PBF or .OSM.BZ2 to Geo .Tiff via Command Line

0
1

How do I convert .osm.pbf or .osm.bz2 http://download.geofabrik.de/africa-latest.osm.bz2. to Geo .tiff via commandline? I want is end results to convert files to .mbtiles. If I have Geo .tiff I can convert using Gdal to .mbtiles easily. This is the response I got from the guys at geofabrik.de.

 This is not so easy. You will want to have different zoom levels
 generated, so it is better to go osm->mbtiles directly without GDAL and
 GeoTiff. However, osm->mbtiles requires map rendering and style
 information. If it is for a small area, you can probably use Maperitive
 for this (unsure if it has a command line). Otherwise you will need to
 import OSM data into a PostGIS database, and then you can use e.g.
 Tilemill to batch-process

(Credits Frederik Ramm)

Can someone translate this? How do I import OSM data into PostGIS database. Reference: https://wiki.openstreetmap.org/wiki/Osm2pgsql

osm2pgsql -s -U postgres -d nameofdatabase /file/path/toosm/fileorpbf/name.osm

Will this work for .OSM.PBF?

How do I use a Tilemill to do a batch process? What is the commandline arguments?

asked 30 Jul '15, 03:43

Chathu's gravatar image

Chathu
20223
accept rate: 0%

closed 30 Jul '15, 09:40

Hendrikklaas's gravatar image

Hendrikklaas
9.3k207238387

The question has been closed for the following reason “Duplicate Question with just 1 dot extra.” by Hendrikklaas 30 Jul ‘15, 09:40

Source code available on GitHub .