3 ms·
I love image formats and data packing, but was disappointed that the reveal was that maps use raster tiles. The map data is vector, why not render it as such?
by willis936 5y ago
I love image formats and data packing, but was disappointed that the reveal was that maps use raster tiles. The map data is vector, why not render it as such?
- WesolyKubeczek 5y agoThat time when browsers rendered SVG funny if at all was not very long ago. There’s another challenge: you need to provide more and more data as you zoom in, wonder how that should work with vector stuff.
- willis936 5y agoThis already handled afaict. When I zoom in on apple maps on a stalled data connection I can see the sharp edges of the low resolution vector data until the higher resolution data is downloaded. SVG is convenient but isn't necessary.
- WesolyKubeczek 5y agoOn apple maps the app or on the web? Although I suspect that canvas + some homegrown vector engine it is.
- willis936 5y agoThe app. I'm not sure how the web interface behaves.
- jillesvangurp 5y agoA lot of rendering is vector based these days and uses webgl to do it but there are still a lot of tile servers using images as well. This article is from 2015. Vector maps were less common then and webgl was a lot less mature. For example maplibre is a great option for rendering vector based openstreet maps from e.g. maptiler or mapbox. They can tilt the maps, render buildings in 3D, have step less zooming, etc.
- tecleandor 5y agoSome are, but it maight be CPU heavy depending on your platform, acceleration and the numbers of layers/information you have on the screen. Android application OsmAnd is notoriously slow because of this: https://github.com/osmandapp/OsmAnd/discussions/11961 https://github.com/osmandapp/OsmAnd/discussions/11961
- jleedev 5y agoA single ocean tile on mapbox is 39 bytes: 1a25 7802 0a05 7761 7465 7228 8020 1217 1803 2213 0980 69e0 7f1a dfa8 0100 00bf bf01 e0a8 0100 0f Decodes to this protobuf: layers { name: "water" features { type: POLYGON geometry: 9 geometry: 13440 geometry: 16352 geometry: 26 geometry: 21599 geometry: 0 geometry: 0 geometry: 24511 geometry: 21600 geometry: 0 geometry: 15 } extent: 4096 version: 2 } Geometry interpretation is here: https://github.com/mapbox/vector-tile-spec/tree/master/2.1#43-geometry-encoding https://github.com/mapbox/vector-tile-spec/tree/master/2.1#4... And produces this geometry before reprojecting to the tile coordinates: Layer name: water Geometry: Polygon Feature Count: 1 Extent: (0.000000, 0.000000) - (4096.000000, 4096.000000) Layer SRS WKT: (unknown) mvt_id: Integer64 (0.0) OGRFeature(water):0 POLYGON ((0 0,0 4096,4096 4096,4096 0,0 0)) But of course, this doesn't specify a color, just "the ocean is a rectangle".
- chipsa 5y agoSome of the newer map tile formats are vectors instead of raster. But technology hasn't quite caught up with that yet. And some things are still better are rasters (like overlaying satellite/aerial imagery).