-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
is it possible to export tiles #408
Comments
Planetiler creates vector tiles. You can render them in MapLibre GL JS for example. I would search for difference between vector tiles and raster tiles to learn more about the two |
You can export them to pbf with mbutil, like
For example, https://github.com/maplibre/demotiles/tree/gh-pages/tiles-omt **note, in that tiles-omt example, I also had to uncompress the pbfs with something like
(this came from the bottom of https://openmaptiles.org/docs/host/tileserver-php/ ) But like @wipfli said, these aren't images you could use something like maplibre-native to render pngs with a style, but that would take a bit of work. . For example, tileserver-gl is able to generate static images using the node maplibre-native like this |
Although I will say, it is a pain dealing with flat exported files like that because it can be a LOT of files. In my opinion mbtiles is a lot more portable. PMtiles can also be very portable. |
You could also serve the generated mbtiles file with tileserver-gl. It exposes an api that renders raster tiles from the vector tiles and you can download all of the pngs from that to another mbtiles file, for example pointing something like tilelive-copy at the API endpoint. |
hello @msbarry i had try this when i serve the mbtiles file it only give me an option to vector view in tileserver-gl ,,can you explain how it can be possible i want to convert mbtiles into folder format ( pngs) i successfully tried to convert it through a tool (mbutil) it sucessfully convrert it but unfortunately it give me a fatal error "Reading PNG image file" Not a png file |
@toqeer786 why do you need png tiles? If you use MapLibre GL JS, you do not need the png tiles, instead, you can use vector tiles directly... |
Planetiler converts OpenStreetMap data to vector tiles. If you need raster tiles, you need to convert the vector tiles to raster tiles. This can be done for example with tileserver-gl or with MapLibre GL Native node bindings. |
Hi @wipfli i need it pngs form to use it in my project and can you please share link as you said node bindings ? how can i convert vector tiles to raster tiles ,,i had try alots of tools like rasterize-vector tiles ,mbutil , but id didnt help |
https://github.com/maplibre/maplibre-gl-native/tree/main/platform/node and @acalcutt is the expert on how to use this... |
hii. is it possible to export tiles in PNGs format because i want to use tiles for my offline project
The text was updated successfully, but these errors were encountered: