Closed acalcutt closed 8 months ago
Thanks for the png option. Looks like a good addition to me!
it seems size wise, webp could actually be the smallest sized images based on the screenshot above. I wonder what the compatibility of webp is these days
This is example of the effect of using ratio when viewing the files in qgis. you can see the ratio 2 tiles are much sharper
ratio: 1
ratio: 2
Thanks for the quick review @rudokemper. Can you make an NPM release with this new feature?
Sure thing, done.
Just an FYI since I didn't note it.
You can have a ratio higher than 2, it just increases your tile image size the more you raise it. Tileserver GL accepts a max ratio of 3 by default, but can go all the way up to a ratio of 9 depending on your options.
Interesting, I wonder what kind of use case could benefit from such a high ratio.
Speaking of which, I'd be super curious to learn more about how ya'll are using the tool @acalcutt @wipfli!
I don't really have a use yet, but I have wanted to make a rendered mbtiles in the past for some atv trail ideas I have had. sometimes on trails the cell signal is low, so using web based maps isn't ideal. I'd love eventually to make a maplibre-native android app with local tiles that can be used offline.
In the past I have tried to make tiles using Qtiles, like https://techidiots.net/notes/mapbox-gl-tileserver-gl/create-a-esri-satellite-mbtiles-base-map-with-qgis-and-qtiles which i remember was a huge pain
On the maplibre-native side, I know I have seen request for something like this in https://github.com/maplibre/maplibre-native/discussions/2070
Really, mostly I was bored over the weekend and saw something I could contribute here. hope to see more progress on this. Now I am trying to figure out how to speed it up at higher zoom levels. I was trying a few suggestions from google code AI which were good starts, but so far nothing successful. I am trying generate a full planet zoom 14, but it is looking like that would take a month...haha
Super cool, thanks for sharing! Our use case is Indigenous users in an offline context who need maps for data collection or visualization, but I figured the tool could be helpful for a lot of different use cases. So it's affirming to read about other interests, and contribute something back to the broader Maplibre community that everyone can use.
(On an somewhat related note, over at Terrastories we're super grateful for the recent love you and others have given Tileserver-GL, and in particular support for arm architecture has been great for deploying the tool on low energy devices!)
Interesting, I wonder what kind of use case could benefit from such a high ratio.
Speaking of which, I'd be super curious to learn more about how ya'll are using the tool @acalcutt @wipfli!
I'd imagine at minimum it helps make overzooming look sharper. So if you made a low max zoom tile (like say zoom 9) and you were zoomed into zoom 14, a ratio 1 tile would probably be very blury, but a ratio 5 tile may still look decent, since it is basically the size it should be for that zoom level.
Glad my work on maplibre-native node and tileserver-gl is helpful to others :-). I have probably spent way to much time on getting that working
Goal
Adds cli options for 'pixel ratio' and 'tiletype' to allow changing the type of tiles generated from 'jpg', 'png', or 'webp'. It defaults to a ratio of 1 and tiletype of 'jpg', which were the old hardcoded defaults.
Screenshots
with ratio 1, tiletype webp `node . --style self --stylelocation styles\http_pmtiles_local_spites_fonts.json --stylesources styles\data --bounds "-79,37,-78,38" -Z
with ratio 2, tiletype webp
node . --style self --stylelocation styles\http_pmtiles_local_spites_fonts.json --stylesources styles\data --bounds "-79,37,-78,38" -Z 11 -f wdb_11_r2_webp -r 2 -t webp
with ratio 1, tiletype png
node . --style self --stylelocation styles\http_pmtiles_local_spites_fonts.json --stylesources styles\data --bounds "-79,37,-78,38" -Z 11 -f wdb_11_r1_png -r 1 -t png
with ratio 2, tiletype png
with ratio 1, tiletype jpg node . --style self --stylelocation styles\http_pmtiles_local_spites_fonts.json --stylesources styles\data --bounds "-79,37,-78,38" -Z 11 -f wdb_11_r1_jpg -r 1 -t jpg
with ratio 2, tiletype jpg