←back to thread

OpenStreetMap's New Vector Tiles

(tech.marksblogg.com)
479 points marklit | 10 comments | | HN request time: 0s | source | bottom
Show context
zawaideh ◴[] No.42184496[source]
The other issue is that the arabic font is not rendering correctly in the vector version. It's rendering left to right (instead of right to left) with characters broken up instead of linked.
replies(3): >>42185056 #>>42185301 #>>42190246 #
sp8962 ◴[] No.42185056[source]
The whole point of vector tiles is that the rendering is local and controlled by a style configuration (except for the tile schema) that can be changed. So the brokenness you are seeing is either in the style or the library that is rendering the contents locally.
replies(2): >>42185076 #>>42185878 #
SSLy ◴[] No.42185076[source]
Indeed, but that is probably not going to help end users of apps.
replies(1): >>42185643 #
1. sp8962 ◴[] No.42185643[source]
Well nobody claimed things are going to get simpler.

It is difficult to beat raster tiles in that respect. vector tiles split up responsibility for what you get visually over multiple moving pieces with different provenance and operators.

replies(2): >>42185815 #>>42186040 #
2. lxgr ◴[] No.42185815[source]
> It is difficult to beat raster tiles in that respect.

Intuitively, why can't the local vector rasterizer do whatever the server-side tile rasterizer does, especially if both are fully custom?

replies(2): >>42185854 #>>42185938 #
3. wiredfool ◴[] No.42185854[source]
Partially because they're completely different stacks -- the client side is WebGL + Javascript, and the server side is whatever they've been doing for 15 years.

They're probably missing a raqm/freebidi or something in the stack on the client side.

replies(1): >>42186266 #
4. maxerickson ◴[] No.42185938[source]
It can, it's just that they typically don't, because they use an off the shelf data schema for the tiles and a library to handle the rendering.

Having the data in tiles also complicates some things (where the renderer needs to consider merged tiles to get a similar result).

5. astrange ◴[] No.42186040[source]
For Arabic specifically, different users want text to render differently, so you'd want to do it on the client if you can.

(Some countries use Roman numerals and some use Arabic numerals for numbers. And by Arabic numerals I don't mean 1-9.)

replies(1): >>42186779 #
6. lxgr ◴[] No.42186266{3}[source]
Ah, so the input into the client-side isn't OSM-like data (i.e. OSM XML or some high-level transform of that), but rather something closer to a vector graphics format like SVG?

That makes sense then, thank you!

replies(1): >>42186959 #
7. rafram ◴[] No.42186779[source]
All Arabic-speaking countries use Arabic numerals. Some use Western Arabic numerals (123) and some use Eastern Arabic numerals (١٢٣).

Roman numerals are I, V, X, etc.

replies(1): >>42188992 #
8. wiredfool ◴[] No.42186959{4}[source]
It's a mapbox mvt, which is protobuf. It contains the OSM data (obviously), but it's a specific format that's in wide use (mapbox-gl, maplibre, and many other open source versions). There are similar versions in pmtiles, which is basically the same thing in a http range friendly big single file which can be hosted on S3-like storage and used directly.

The difficulty is that the stack for rendering vector tiles in the browser is different than the legacy vector->png generation that's been done for ages.

replies(1): >>42187426 #
9. sp8962 ◴[] No.42187426{5}[source]
> It contains the OSM data (obviously) ...

Not really. You need to build geometries from raw OSM data (aka the stuff that you edit) then transform those geometries into MVT format adding appropriate attributes from the original data. In general you actually will want to normalize the data and throw out anything that is not included in the vector tile schema you are using. The net result is quite far from raw OSM data in any case.

PS: I maintain a project that stores actual OSM data in MBTiles format for offline editing, and yes proper editing apps have to do the above on the fly and it is the main reason they are not lightning fast.

10. throw0101c ◴[] No.42188992{3}[source]
See perhaps:

* https://en.wikipedia.org/wiki/Arabic_numerals_(disambiguatio...

* https://en.wikipedia.org/wiki/Hindu–Arabic_numeral_system#Gl...

* https://en.wikipedia.org/wiki/List_of_numeral_systems