thomersch / scapegoat

0 stars 0 forks source link

Unembed images from josm #7

Open grischard opened 4 years ago

grischard commented 4 years ago

The JOSM xml contains a lot of base64-encoded icons. Every single tile we generate will contain, for example, the maxar and mapbox icons in base64.

Using https://github.com/osmlab/editor-layer-index/blob/gh-pages/scripts/unembed-icons.py , unembed them and host them on https://imagery.openstreetmap.lu/icons/

thomersch commented 4 years ago

Is this really more efficient? base64 has 1/3 overhead, but in case a user loads a list of several layers, they'll have to make n requests to fetch every icon.

grischard commented 4 years ago

I might not want to download all the icons - 10/5 covers Cologne, but if you're editing there you don't care about the LU/FR/NL/BE layer icons.

Base64 also can't be cached, the icons can't be optimised with stuff like imageoptim, and http/2 makes subsequent requests cheap.

thomersch commented 4 years ago

Yep, makes sense.