Most active commenters

    ←back to thread

    OpenStreetMap's New Vector Tiles

    (tech.marksblogg.com)
    479 points marklit | 12 comments | | HN request time: 0.856s | source | bottom
    1. DemocracyFTW2 ◴[] No.42182817[source]
    One clear advantage of the new SVG format is, apparently, that Arabic script is now, finally!, rendered the way it was always intended—left-to-right with unconnected letters /s
    replies(5): >>42183178 #>>42183255 #>>42183421 #>>42183525 #>>42187652 #
    2. rafram ◴[] No.42183178[source]
    Yeah, I’m curious if that problem is baked into the SVG, or if the renderer has a “don’t screw up Arabic” option that’s disabled by default. You’d think nobody would design software that way, but Photoshop has that option, and it really is turned off by default!
    replies(1): >>42183355 #
    3. SigmundA ◴[] No.42183255[source]
    Mapbox Vector Tiles are not SVG, its is similar to geoJSON but encoded in protobuf. The renderer is going to typically be WebGL based in the browser written in javascript.

    https://wiki.openstreetmap.org/wiki/Vector_tiles

    https://maplibre.org/maplibre-gl-js/docs/

    4. Symbiote ◴[] No.42183355[source]
    They are just Unicode strings in the vector tiles (which are their own format, nothing to do with SVG). It's this particular demo that is missing basic Arabic support.

      string_value: "شارع المدينة القديمة"
    
    I can't read Arabic, but I know if I see "ل ا" then it's broken — "ال" is correct: https://isthisarabic.com/

    Someone's already made an issue: https://github.com/pnorman/osmf-shortbread-todo/issues/9

    Found via what seems to be the announcement of this demo/preview service: https://community.openstreetmap.org/t/vector-tiles-on-osmf-h...

    5. memsom ◴[] No.42183421[source]
    I wish they were SVG, that would make rendering them less of a headache.

    There is still no good library which takes in a MVT tile and spits out the appropriate PNG or JPEG for rendering in via a tile base mapping engine. There is still no good cross platform mapping engine that can render vector tiles in a way that is easy to consume. There are certainly engines on specific platforms, but unless we use something like Leaflet or OpenLayers it is hard to make it work with native APIs on, say Windows, MacOs, Linux, iOS or Android without needing to adding a whole browser engine on top of your app.

    replies(3): >>42183631 #>>42185033 #>>42190571 #
    6. rob74 ◴[] No.42183525[source]
    So while showcasing the brand-new vector tiles, they accidentally also showcased a pretty significant bug? Should have picked some city with non-latin script that's written left-to-right... er, maybe Athens?
    replies(1): >>42186922 #
    7. dvdkon ◴[] No.42183631[source]
    There are plenty non-web vector map renderers, but they generally provide a full GUI widget, not a simple "extent -> png" function. I don't think creating that would be too much work, though: Just set one of those libraries to render to a texture.

    Maplibre Native even seems to have a headless "render to PNG" backend: https://github.com/maplibre/maplibre-native/tree/main/platfo...

    8. mxfh ◴[] No.42185033[source]
    If I would like to print vector-tile based maps to pdfs for handout's or something, is there any CPU renderer, server- or client-side that could output SVGs instead of rasterizing on GPU to bitmap at some point?

    I havent yet come across any renderer that would do this even partially, even before opening the whole can of worms that is text rendering.

    Closest thing I'm aware of might be ArcGIS Maps for Adobe Creative Cloud but would need something that's more like a library and preferably FOSS.

    replies(2): >>42186764 #>>42186785 #
    9. InsertUser ◴[] No.42186764{3}[source]
    Recent versions of QGIS support vector tiles in the MVT format (like these ones). So with a suitable style you should be able to create a layout using vector tiles and print.

    Assuming you meet the relevant attribution/license requirements for the various bits you choose of course. I don't think any usage policy has been published for these tiles yet.

    Unfortunately there are some translation issues with styles for MVT sources so you might need to do a bit of fixing if you don't want to go the route of a paid plan with MapTiler (third party provider) who have a plugin.

    There's also a list of "print map" generators of varying types here: https://wiki.openstreetmap.org/wiki/OSM_on_Paper

    10. dvdkon ◴[] No.42186785{3}[source]
    QGIS can do this. It's a large dependency and loads Mapbox/Maplibre styles by converting them to internal ones, so it might look a little different than the standard Maplibre renderer, but you get the benefit of easily editing those styles.
    11. InsertUser ◴[] No.42186922[source]
    They released them for testing purposes, originally on a test server and now a soft launch on OSMF hardware. https://community.openstreetmap.org/t/vector-tiles-on-osmf-h...

    The author of the blog post chose an area that doesn't render well. The various issues are being flagged in the relevant repositories as they are found.

    12. chrisdalke ◴[] No.42190571[source]
    Yup. I work a lot with MVTs and one of the headaches is, after you have your nice shiny state-of-the-art maps, turning them back into PNG raster tiles for all the various clients that can't natively render vector tiles.

    This link is shrinking though! There's slowly growing support. Leaflet and OpenLayers are fundamentally limited by being canvas-based, so there's only so much they can do.

    QGIS has one of the fastest, cleanest MVT renderers I've seen, but I don't know how easy that would be to extract out.

    PostGIS is the best platform for generating vector tiles, but it's extremely clunky. On the projects I'm working on (eg https://vectorcharts.com/) I do extensive processing in PostGIS, but then encode to vector tiles in bespoke C++ code.