Graphs are able to access .tab pages, but there is no easy/good way to get geometries. Additionally, Vega2 only allows TopoJSON, which it internally converts to GeoJSON for processing (TopoJSON has ~4x space saving for transmission). The problem is, we already use the less efficient GeoJSON, which means that graphs are not able to consume them directly.
I see several solutions:
- Encode GeoJSON to TopoJSON in PHP as part of mwapi.
- PROs: direct db access, allows to eventually store data as TopoJSON
- CONs: more like a blocker - there is no PHP TopoJSON encoder, only decoder
- Do all TopoJSON processing in Kartotherian
- PROs: established JS libraries
- CONs: Kartotherian becomes a proxy, converting mwapi response into a TopoJSON
- Patch Vega to allow direct GeoJSON consumption
- PROs: Client-side only code, consist backend for all features
- CONs: We continue wasting 4x bandwidth for the map data transmission, possible Vega fork