2

I am using Mapbox Offline Map in my app using MBTiles. Previously I was using shapefiles for creating offline maps. After searching a lot I am not getting Australian shapefiles.

But my friend referred this URL which contain all the layers of MBtiles of ".osm.pbf" format (not .shp format).

Is there any way to use ".osm.pbf" file in TileMill to create MBtiles file or a way to convert ".osm.pbf" file to ".shp" file and then use it in TileMill?

2 Answers 2

1

Specifically answering the question you could use

osm2pgsql to get the open street map into postgres.

From here you can use postgres to shape command line

pgsql2shp

Bear in mind - TileMill is going to generate a rastered image map tile / not a vector. Using the original protocol buffer format / pbf is a better place to start and then you can apply styles on the fly.

Have a look at this video for high level overview of vector maps https://www.youtube.com/watch?v=se2cd3BMYRY

0

We can use ogr2ogr to convert .osm.pbf to .shp file.

ogr2ogr -f "ESRI Shapefile" -skip  CGK.osm.shp CGK.osm.pbf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.