Open sgofferj opened 10 months ago
I'll have to take a look into styling mbtiles. Unfortunately, I think this will require a considerable amount of time to be implemented and due to the ongoing UI migration this may take some time...
I know nothing about the internals of the mbtiles format but I have been doing stuff with gdal before. If you could point me to how you create mbtiles, I can have a look how much I understand.
I know nothing about the internals of the mbtiles format but I have been doing stuff with goal before. If you could point me to how you create mbtiles, I can have a look how much I understand.
Edit: Found this on a quick Google search: https://sputnik-maps.github.io/mvt-styler/
I can send you a JS file that is used to style most items in the mbtiles data but achieving the same look as the openaip map will not work U suppose. This is due to the fact that our tile service outputs custom generated geometries that are only relevant for rendering. Since we use those MVTs only for rendering the map, this is a suitable approach. In the mbtiles context, I assume this will not make much sense since they can also be used to extract data from them and if we would add those "styling only geometries", this would make up room for a lot of errors.
But basic styling should be possible still. This is the tippecanoe call that we use to generate a.mbtiles
files from a country .geojson
file from the public export bucket:
tippecanoe --attribution="Courtesy of <a href="https://www.openaip.net">OpenAIP and contributors</a>" --projection=EPSG:4326 --allow-existing --force --no-line-simplification --no-tiny-polygon-reduction --drop-densest-as-needed -d 12 -z 12 -B 0 --output="$LOCAL_MBTILES_FOLDER/$FILENAME".mbtiles $LOCAL_GEOJSON_FILE
Is this of any help for you?
I'll check this. It's possible that I mix something up, but I am fairly sure I have read some time ago that it's possible to embed rendering styles in .mbtiles files. I might be wrong though - it's also possible that it was about about creating a raster .mbtiles-file from styles. It's a while ago that I read the article and I'm still searching for it.
I have been downloading the mbtiles files from Google Cloud to use them in QGIS, ATAK and/or Oruxmaps and maybe put them on a local mapserver but at least with QGIS and ATAK I ran into the issue that there seems to be no styles included in the files. I'd like to suggest you publish per country mbtiles files which contain all layers including styles for usage in arbitrary third party apps. Mbtiles are very convenient packages, at least for mobile devices - if the styles are included :).