Scottish-Tech-Army / Soundscape-Android

This is the source for an Android version of the original iOS Soundscape app
https://scottish-tech-army.github.io/Soundscape-Android/
Other
3 stars 2 forks source link

Replace soundscape-backend with parsing of the vector tiles from the UI map server #152

Open davecraig opened 1 month ago

davecraig commented 1 month ago

Vector tiles contain much of the same information as the GeoJSON tiles from the soundscape-backend server. This issue is to investigate what would be required to use the vector tiles instead of the soundscape-backend server. I think that although not totally straightforward, it's not impossible. It may require custom changes to tile generation tools to add intersections (and entrances?) to the max zoom tiles which by default don't always exist in vector mapping tiles.

The reason to do this would be to reduce the amount of infrastructure required to support the app which would reduce the monthly cost. This is discussed here https://scottish-tech-army.github.io/Soundscape-Android/mapping.html, and the cost of running a protomaps server which would provide both UI and tiles for audio has a cost calculator here. If we could make this work, then the ongoing server cost would be very small indeed.

davecraig commented 1 month ago

Some work has been done here in unit tests to demonstrate whether or not it is actually possible. See VectorTileTest in the code.

davecraig commented 1 week ago

This has progressed significantly. The server has been updated with new maps which have OSM ids for every road in the transportation layer. This means that de-duplication is now being accurately done. Remaining work:

davecraig commented 1 week ago

The changes I've made to adjust the map that we use are now here: https://github.com/davecraig/planetiler-openmaptiles. I'll move this to be an STA owned repo at some point. It's built by running scripts/build.sh and then the result can be used to build a protomaps file e.g.

java -Xmx30g -jar ../target/planetiler-openmaptiles-3.15.1-SNAPSHOT-with-deps.jar --force --area=europe --downl
oad --fetch-wikidata --output=map-to-serve/europe.pmtiles --nodemap-type=array --storage=mmap --maxzoom=15 --re
nder_maxzoom=15 --simplify-tolerance-at-max-zoom=0