rurseekatze / node-tileserver

A lightweight tileserver based on NodeJS for serving bitmap and vector tiles.
162 stars 33 forks source link

Compress vector tiles #12

Open rurseekatze opened 10 years ago

rurseekatze commented 10 years ago

It seems that vector rendering is very slow not because of the browser rendering itself, but large vector data tiles.

Another way of reducing tile size is removing tags that are not rendered (such as source=, fixme=, description=, note=) and compressing tags since there are a lot tags that occur at almost every feature (like railway=rail).

And some compression could be achieved by using shorter property names (e.g. 'c' instead of 'coordinates').

rurseekatze commented 10 years ago

Also think of using binary formats like protocol buffers and compressing tiles with e.g. gzip.

rurseekatze commented 9 years ago

Have a look at

rurseekatze commented 8 years ago

Compression using gzip:

DerDakon commented 8 years ago

I suggest that the tiles are gzipped right at the creation, and also saved this way. This could save some byte of disk space if a compressed file then becomes a disk block smaller, but it is also expected that it's the common case that clients support gzip encoding. The few clients that do not can be served by _de_compressing the data when sending to them, which is less expensive than _com_pressing on the fly.