4 ms·
I was planning to compile Brouter (or just the algorithm) part in WASM last year, never got it finished. I would prefer the routing algorithm as WASM module so
by Ciantic 4y ago
I was planning to compile Brouter (or just the algorithm) part in WASM last year, never got it finished.
I would prefer the routing algorithm as WASM module so that routing apps can be done as static web sites. It's not that expensive algorithm after all.
Only hard part was splitting the dataset as static files, but it was neatly tiled already so it shouldn't be too hard.
- usrusr 4y agoI have been armchair-programming that myself recently, "could we perhaps wasm brouter into an offline-able PWA?", but getting the graph data to the browser would be quite an obstacle. They doing come in packages of about a hundred megabytes (depending on region, and you might want four of them)
- phyks 4y agoDo you have some code already working for the WASM part? BRouter works by relying on segments (relevant extracts from the OSM data, in a custom format) of 5x5 latitude/longitude degrees. See https://github.com/abrensch/brouter/blob/f3895791766dfcd7cd0f503008443508f46de742/misc/scripts/mapcreation/process_pbf_planet.sh#L46 https://github.com/abrensch/brouter/blob/f3895791766dfcd7cd0... for their creation (full doc https://github.com/abrensch/brouter/blob/1765ec45230e337319c604978c7cab91a297d752/docs/developers/build_segments.md https://github.com/abrensch/brouter/blob/1765ec45230e337319c...). From my knowledge of the BRouter codebase and past contributions, it should not be a big deal to move from 5x5 to something more web tractable (as 1x1 latitude/longitude).
- usrusr 4y agoArmchair only, sorry. Closest thing I've come to regarding brouter sources was wondering about what it would take to add relation names (road names). Because that could not only help route consumption (better turn instructions), it would also enable adding "road change" penalty to the rules: currently that's only based on direction change, which causes trouble in mountain environments where steep straight connections exist: the turn penalty affects the gentle switchback climb/descent harder than the undesirable straight.