1
0
mirror of https://github.com/alfanhui/mbtilesToPngs.git synced 2025-05-16 06:50:10 -07:00

Create README.md

This commit is contained in:
Stu 2018-06-06 21:42:49 +01:00 committed by GitHub
parent 800b4f9d9a
commit 935662c20b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

30
README.md Normal file
View File

@ -0,0 +1,30 @@
# mbtileToPng
This python program takes .mbtile files and extracts the images and places them into the correct directory structure /${z}/${x}/${y}.png that mimicks OpenStreetMap URI tile structure.
This is to allow for offline use of OpenStreetMaps, and I will be using (Flutter_Map)[https://github.com/apptreesoftware/flutter_map] along with my own images for offline maps.
##Where to get .mbtile?
OpenStreetMap says: Apart from very limited testing purposes, you should not use the tiles supplied by OpenStreetMap.org itself. OpenStreetMap is a volunteer-run non-profit body and cannot supply tiles for large-scale commercial use. Rather, you should use a third party provider that makes tiles from OSM data, or generate your own.
(Guide to generate your own)[https://tilemill-project.github.io/tilemill/docs/guides/osm-bright-mac-quickstart/]
This guide will go through the steps for compiling map data, downloading a specific area, customise the map, then export to mbtile.
Warning! For Mac, when you install TileMill.app, it currently fails to start. Go into TileMill > Updates Preference > check Install Developer Builds.
##How to use
Make sure you have python3 install.
`python3 mbtileToPng.py -i path_to_mbfile`
for example, I did:
**python3 sqliteReader.py -i ./OSMBright.mbtiles**
(MBTiles)[https://wiki.openstreetmap.org/wiki/MBTiles]
(Tiles)[https://wiki.openstreetmap.org/wiki/Tiles]
## License
This project is licensed under the [MIT License](LICENSE.md)
Thank you © OpenStreetMap (and) contributors, ODbL for the data!
Thank you AppTreeSoftware for (Flutter_Map)[https://github.com/apptreesoftware/flutter_map]