From c528a316844d240853e288a860db80677998bb71 Mon Sep 17 00:00:00 2001 From: artemp Date: Mon, 16 Mar 2015 16:19:24 +0100 Subject: [PATCH] to_wkb - optimise to multi_point geometries --- include/mapnik/util/geometry_to_wkb.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/mapnik/util/geometry_to_wkb.hpp b/include/mapnik/util/geometry_to_wkb.hpp index 378ce20b0..3e2a7a2e3 100644 --- a/include/mapnik/util/geometry_to_wkb.hpp +++ b/include/mapnik/util/geometry_to_wkb.hpp @@ -204,7 +204,7 @@ wkb_buffer_ptr polygon_wkb( new_geometry::polygon const& poly, wkbByteOrder byte wkb_buffer_ptr multi_point_wkb( new_geometry::multi_point const& multi_pt, wkbByteOrder byte_order) { - std::size_t size = 1 + 4 + (1 + 4 + 8 * 2) * multi_pt.size() ; // byteOrder + wkbType + Point.size * num_points + std::size_t size = 1 + 4 + 4 + (1 + 4 + 8 * 2) * multi_pt.size() ; // byteOrder + wkbType + num_point + Point.size * num_points wkb_buffer_ptr wkb = std::make_unique(size); wkb_stream ss(wkb->buffer(), wkb->size()); ss.write(reinterpret_cast(&byte_order),1); @@ -254,10 +254,10 @@ struct geometry_to_wkb // multi/collection - //result_type operator() (new_geometry::multi_point const& multi_pt) const - //{ - // return multi_point_wkb(multi_pt, byte_order_); - //} + result_type operator() (new_geometry::multi_point const& multi_pt) const + { + return multi_point_wkb(multi_pt, byte_order_); + } template result_type operator() (Geometry const& geom) const