Skip to content
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

[FEATURE] generate low details tiles for whole planet when generating detailed tiles for certain region #133

Open
caspg opened this issue Mar 12, 2022 · 8 comments

Comments

@caspg
Copy link

caspg commented Mar 12, 2022

First of all, huge thanks for building this great application!


Is your feature request related to a problem? Please describe.

I've generated tiles for Europe and it works great. I wonder if there would be an option to create tiles (country contours, rivers, etc) for the whole planet and the detailed tiles for the desired region?

Screenshot 2022-03-12 at 12 50 00

@msbarry
Copy link
Contributor

msbarry commented Mar 12, 2022

Hello! That would probably be doable for some sources, for example natural earth and water polygons but any low zoom features rendered from OSM won't show up.

I think this would require a new config attribute, and a logic tweak in SimpleReader to not filter geometries when reading, and also a tweak to how TileExtents computes the tile x/y range limits by zoom level when that attribute is specified.

I'm working on a few other tasks first so it might be some time before I could take a look at this, but I'd be happy to review a PR.

As a workaround you can run with --bounds=planet to generate the whole planet for all zoom levels but only OSM details from your extract. Or to save space, run planetiler a second time with --bounds=planet --maxzoom=5 and combine the two mbtiles with a tool like tilelive-copy.

@caspg
Copy link
Author

caspg commented Mar 12, 2022

@msbarry Thanks for the reply. I'm afraid I won't be able to help with development since I know nothing about Java 😬

I will try to play with suggested workarounds though.

@caspg
Copy link
Author

caspg commented Mar 16, 2022

Merging two mbtiles using tilelive-copy gave me broken results (empty tiles) but it looked ok using tile-join (from https://github.com/mapbox/tippecanoe). It saves space but tileserver is returning empty tiles after zoom level 5.

Generating tiles with --bounds=planet gives better results IMO. It allows moving around the map and zoom everywhere. Of course, detailed tiles are returned only for the specific region. Low details tiles for the whole planet add around 25GB to the output.mbtiles.

@msbarry
Copy link
Contributor

msbarry commented Mar 17, 2022

Responded in slack - tilelive-copy is probably messing with the metadata. You may need to manually ensure that minzoom=0, maxzoom=14, bounds=-180,-90,180,90 when you combine using tilelive-copy

@makidoll
Copy link

makidoll commented May 2, 2022

Thank you so much for this awesome program. I'm so happy it exists and I'd love to give support if I could.

I was looking at this too after I generated a planet mbtiles file yesterday. I'm extremely pleased with the results, however comparing my output with MapTiler, it's missing some low zoom details I wish I'd have. In the meantime I'll look around for a solution. I know OSM Liberty adds in some natural earth relief tiles hosted on GitHub, but they're not as pretty.

Planetiler:
image

MapTiler:
image

@msbarry
Copy link
Contributor

msbarry commented May 3, 2022

Thanks for reaching out @MAKITSUNE! For onthegomap I use natural earth 2 shaded relief - it looks ok but a vector style would be nicer. I'm trying to keep planetiler compatilble with open-source openmaptiles by default, but it's fine to add changes you can opt-into with command-line flags. My understanding is that maptiler's global landcover data is a proprietary dataset, any idea if an open alternative might exist elsewhere?

@acalcutt
Copy link

acalcutt commented May 3, 2022

@MAKITSUNE

In my map style at wifidb.net I added a raster layer behind the planetiler map that looks like this
https://tiles.wifidb.net/data/jaxa_color/#1.32/50.3/-48.7

Which I can then merge into my style like this
https://tiles.wifidb.net/styles/WDB_OSM/#1.19/29.3/-54

I generated my color relief using gdaldem. Right now I have a copy under jaxa_color.mbtiles here ( https://drive.google.com/drive/folders/1Uo5xyFd8it7UH3pSmBiWP4lfZdM9OmhA?usp=sharing ) though I am trying to regenerate them without a missing chunk of greenland (currently working on this)

@acalcutt
Copy link

I just wanted to let you know, I finally updated my raster color-relief mbtiles if you are still looking for something. I've updated all my full planet mbtiles made from the JAXA DEM images and put them on my google drive if anyone is interested. They can be downloaded here https://drive.google.com/drive/folders/1Uo5xyFd8it7UH3pSmBiWP4lfZdM9OmhA?usp=sharing

jaxa_terrainrgb.mbtiles - Is a full planet TerrainRGB file made with gdal and rio rgbify. This can be used with the new terrain features of maplibre or with the older hillshade features. (example here).

jaxa_color.mbtiles - A full planet color relief map created using gdaldem color-relief (example here)

jaxa_hillshade.mbtiles - A full planet hillshade map created with gdaldem hillshade. I preferer to use the TerrainRGB dynamic hillshade over this file, but I updated it anyway. (example here)

As you can see from the examples above, I have fixed the missing chunk of Greenland that the last version of these files had.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants