Closed springmeyer closed 9 years ago
The bug is right here: https://github.com/mapbox/mapnik-vector-tile/blob/37f42a27934b3901be482892d4d5b01e2b2e906c/src/vector_tile_processor.ipp#L928-L937. Instead of encoding each point of a multipoint separately the encoder should be encoding the multipoint itself.
fixed in 4a3017c
landed in master (and future v0.9.2) in https://github.com/mapbox/mapnik-vector-tile/commit/2f71ea9a0318c0fa2c32ed29bb074018ee8909ec
Currently in v0.9.x multipoint geometries are not encoded correctly. Multipoints are currently being encoded as:
Where
directive
is the command that stores thecommand
(e.g.move_to
in this case) and the length of repeated commands (number ofmove_to
commands). The problem is that thedirective
is always encodingcmd=move_to
andlength=1
which it not ideal.Instead multipoints should be encoded as:
Where directive is
cmd=move_to
andlength=4
(or more).This is likely a regression around the time of this merge.
While compliant decoders should (and do) handle this type of encoding, it is incorrect in the sense that it does not take advantage of the ability of the
directive
to tell the decoder about the # of repeated commands. This bug therefore makes it impossible to take advantage of this obvious optimization (for multipoints): https://github.com/mapbox/mapnik-vector-tile/issues/119