Closed springmeyer closed 9 years ago
The move to simplifying in integer space (https://github.com/mapbox/mapnik-vector-tile/commit/e75bcfcc74ff1bc0908b320129671c7081563a8e#diff-2f08898bf55283bb72b03127f87d076fL883) flipped the signature for the encoder_visitor for points from mapnik::geometry::point<double> const& geom to mapnik::geometry::point<std::int64_t> & geom. The double->int64 is not the problem but rather the dropping of const because then the encoder hits this no-op: https://github.com/mapbox/mapnik-vector-tile/blob/master/src/vector_tile_processor.ipp#L1199-L1202 (which is intended only to catch geometry_empty and geometry_collection).
encoder_visitor
mapnik::geometry::point<double> const& geom
mapnik::geometry::point<std::int64_t> & geom
const
geometry_empty
geometry_collection
I think the best solution to this is to have encoder_visitor only accept const& geom and to avoid mutating the underlying geometries that are passed in.
const& geom
The move to simplifying in integer space (https://github.com/mapbox/mapnik-vector-tile/commit/e75bcfcc74ff1bc0908b320129671c7081563a8e#diff-2f08898bf55283bb72b03127f87d076fL883) flipped the signature for the
encoder_visitor
for points frommapnik::geometry::point<double> const& geom
tomapnik::geometry::point<std::int64_t> & geom
. The double->int64 is not the problem but rather the dropping ofconst
because then the encoder hits this no-op: https://github.com/mapbox/mapnik-vector-tile/blob/master/src/vector_tile_processor.ipp#L1199-L1202 (which is intended only to catchgeometry_empty
andgeometry_collection
).I think the best solution to this is to have
encoder_visitor
only acceptconst& geom
and to avoid mutating the underlying geometries that are passed in.