more fixes (dependent names etc)
This commit is contained in:
parent
61f42b229d
commit
d5f9a14b58
2 changed files with 28 additions and 28 deletions
|
@ -37,7 +37,7 @@ void render(mapnik::geometry::multi_polygon<double> const& geom,
|
|||
mapnik::box2d<double> const& extent,
|
||||
std::string const& name)
|
||||
{
|
||||
using path_type = mapnik::transform_path_adapter<mapnik::view_transform,mapnik::geometry::polygon_vertex_adapter>;
|
||||
using path_type = mapnik::transform_path_adapter<mapnik::view_transform,mapnik::geometry::polygon_vertex_adapter<double>>;
|
||||
using ren_base = agg::renderer_base<agg::pixfmt_rgba32_plain>;
|
||||
using renderer = agg::renderer_scanline_aa_solid<ren_base>;
|
||||
mapnik::image_rgba8 im(256,256);
|
||||
|
@ -54,7 +54,7 @@ void render(mapnik::geometry::multi_polygon<double> const& geom,
|
|||
agg::rasterizer_scanline_aa<> ras;
|
||||
for (auto const& poly : geom)
|
||||
{
|
||||
mapnik::geometry::polygon_vertex_adapter va(poly);
|
||||
mapnik::geometry::polygon_vertex_adapter<double> va(poly);
|
||||
path_type path(tr,va,prj_trans);
|
||||
ras.add_path(path);
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ class test1 : public benchmark::test_case
|
|||
mapnik::box2d<double> extent_;
|
||||
std::string expected_;
|
||||
public:
|
||||
using conv_clip = agg::conv_clip_polygon<mapnik::geometry::polygon_vertex_adapter>;
|
||||
using conv_clip = agg::conv_clip_polygon<mapnik::geometry::polygon_vertex_adapter<double>>;
|
||||
test1(mapnik::parameters const& params,
|
||||
std::string const& wkt_in,
|
||||
mapnik::box2d<double> const& extent)
|
||||
|
@ -95,7 +95,7 @@ public:
|
|||
return false;
|
||||
}
|
||||
mapnik::geometry::polygon<double> const& poly = mapnik::util::get<mapnik::geometry::polygon<double>>(geom);
|
||||
mapnik::geometry::polygon_vertex_adapter va(poly);
|
||||
mapnik::geometry::polygon_vertex_adapter<double> va(poly);
|
||||
|
||||
|
||||
conv_clip clipped(va);
|
||||
|
@ -180,7 +180,7 @@ public:
|
|||
{
|
||||
unsigned count = 0;
|
||||
mapnik::geometry::polygon<double> const& poly = mapnik::util::get<mapnik::geometry::polygon<double>>(geom);
|
||||
mapnik::geometry::polygon_vertex_adapter va(poly);
|
||||
mapnik::geometry::polygon_vertex_adapter<double> va(poly);
|
||||
conv_clip clipped(va);
|
||||
clipped.clip_box(
|
||||
extent_.minx(),
|
||||
|
@ -212,7 +212,7 @@ class test2 : public benchmark::test_case
|
|||
mapnik::box2d<double> extent_;
|
||||
std::string expected_;
|
||||
public:
|
||||
using poly_clipper = agg::conv_clipper<mapnik::geometry::polygon_vertex_adapter, agg::path_storage>;
|
||||
using poly_clipper = agg::conv_clipper<mapnik::geometry::polygon_vertex_adapter<double>, agg::path_storage>;
|
||||
test2(mapnik::parameters const& params,
|
||||
std::string const& wkt_in,
|
||||
mapnik::box2d<double> const& extent)
|
||||
|
@ -244,7 +244,7 @@ public:
|
|||
ps.line_to(extent_.maxx(), extent_.maxy());
|
||||
ps.line_to(extent_.maxx(), extent_.miny());
|
||||
ps.close_polygon();
|
||||
mapnik::geometry::polygon_vertex_adapter va(poly);
|
||||
mapnik::geometry::polygon_vertex_adapter<double> va(poly);
|
||||
poly_clipper clipped(va,ps,
|
||||
agg::clipper_and,
|
||||
agg::clipper_non_zero,
|
||||
|
@ -313,7 +313,7 @@ public:
|
|||
for (unsigned i=0;i<iterations_;++i)
|
||||
{
|
||||
unsigned count = 0;
|
||||
mapnik::geometry::polygon_vertex_adapter va(poly);
|
||||
mapnik::geometry::polygon_vertex_adapter<double> va(poly);
|
||||
poly_clipper clipped(va,ps,
|
||||
agg::clipper_and,
|
||||
agg::clipper_non_zero,
|
||||
|
@ -368,7 +368,7 @@ public:
|
|||
mapnik::geometry::polygon<double> & poly = mapnik::util::get<mapnik::geometry::polygon<double> >(geom);
|
||||
mapnik::geometry::correct(poly);
|
||||
std::deque<mapnik::geometry::polygon<double> > result;
|
||||
mapnik::geometry::bounding_box bbox(extent_.minx(),extent_.miny(),extent_.maxx(),extent_.maxy());
|
||||
mapnik::geometry::bounding_box<double> bbox(extent_.minx(),extent_.miny(),extent_.maxx(),extent_.maxy());
|
||||
boost::geometry::intersection(bbox,poly,result);
|
||||
std::string expect = expected_+".png";
|
||||
std::string actual = expected_+"_actual.png";
|
||||
|
@ -407,7 +407,7 @@ public:
|
|||
}
|
||||
mapnik::geometry::polygon<double> & poly = mapnik::util::get<mapnik::geometry::polygon<double> >(geom);
|
||||
mapnik::geometry::correct(poly);
|
||||
mapnik::geometry::bounding_box bbox(extent_.minx(),extent_.miny(),extent_.maxx(),extent_.maxy());
|
||||
mapnik::geometry::bounding_box<double> bbox(extent_.minx(),extent_.miny(),extent_.maxx(),extent_.maxy());
|
||||
bool valid = true;
|
||||
for (unsigned i=0;i<iterations_;++i)
|
||||
{
|
||||
|
@ -416,7 +416,7 @@ public:
|
|||
unsigned count = 0;
|
||||
for (auto const& geom : result)
|
||||
{
|
||||
mapnik::geometry::polygon_vertex_adapter va(geom);
|
||||
mapnik::geometry::polygon_vertex_adapter<double> va(geom);
|
||||
unsigned cmd;
|
||||
double x,y;
|
||||
while ((cmd = va.vertex(&x, &y)) != mapnik::SEG_END) {
|
||||
|
@ -567,7 +567,7 @@ public:
|
|||
}
|
||||
mapnik::geometry::polygon<double> & poly = mapnik::util::get<mapnik::geometry::polygon<double> >(geom);
|
||||
mapnik::geometry::correct(poly);
|
||||
mapnik::geometry::bounding_box bbox(extent_.minx(),extent_.miny(),extent_.maxx(),extent_.maxy());
|
||||
mapnik::geometry::bounding_box<double> bbox(extent_.minx(),extent_.miny(),extent_.maxx(),extent_.maxy());
|
||||
bool valid = true;
|
||||
for (unsigned i=0;i<iterations_;++i)
|
||||
{
|
||||
|
@ -576,7 +576,7 @@ public:
|
|||
unsigned count = 0;
|
||||
for (auto const& geom : result)
|
||||
{
|
||||
mapnik::geometry::polygon_vertex_adapter va(geom);
|
||||
mapnik::geometry::polygon_vertex_adapter<double> va(geom);
|
||||
unsigned cmd;
|
||||
double x,y;
|
||||
while ((cmd = va.vertex(&x, &y)) != mapnik::SEG_END) {
|
||||
|
|
|
@ -102,7 +102,7 @@ struct geometry_equal_visitor
|
|||
REQUIRE(p1.x == Approx(p2.x));
|
||||
REQUIRE(p1.y == Approx(p2.y));
|
||||
}
|
||||
|
||||
|
||||
template <typename T>
|
||||
void operator() (line_string<T> const& ls1, line_string<T> const& ls2)
|
||||
{
|
||||
|
@ -111,18 +111,18 @@ struct geometry_equal_visitor
|
|||
REQUIRE(false);
|
||||
}
|
||||
|
||||
for(auto const& p : zip_crange(ls1, ls2))
|
||||
for(auto const& p : zip_crange(ls1, ls2))
|
||||
{
|
||||
REQUIRE(p.get<0>().x == Approx(p.get<1>().x));
|
||||
REQUIRE(p.get<0>().y == Approx(p.get<1>().y));
|
||||
REQUIRE(p.template get<0>().x == Approx(p.template get<1>().x));
|
||||
REQUIRE(p.template get<0>().y == Approx(p.template get<1>().y));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template <typename T>
|
||||
void operator() (polygon<T> const& p1, polygon<T> const& p2)
|
||||
{
|
||||
(*this)(static_cast<line_string<T> const&>(p1.exterior_ring), static_cast<line_string<T> const&>(p2.exterior_ring));
|
||||
|
||||
|
||||
if (p1.interior_rings.size() != p2.interior_rings.size())
|
||||
{
|
||||
REQUIRE(false);
|
||||
|
@ -130,7 +130,7 @@ struct geometry_equal_visitor
|
|||
|
||||
for (auto const& p : zip_crange(p1.interior_rings, p2.interior_rings))
|
||||
{
|
||||
(*this)(static_cast<line_string<T> const&>(p.get<0>()),static_cast<line_string<T> const&>(p.get<1>()));
|
||||
(*this)(static_cast<line_string<T> const&>(p.template get<0>()),static_cast<line_string<T> const&>(p.template get<1>()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ struct geometry_equal_visitor
|
|||
{
|
||||
(*this)(static_cast<line_string<T> const&>(mp1), static_cast<line_string<T> const&>(mp2));
|
||||
}
|
||||
|
||||
|
||||
template <typename T>
|
||||
void operator() (multi_line_string<T> const& mls1, multi_line_string<T> const& mls2)
|
||||
{
|
||||
|
@ -150,10 +150,10 @@ struct geometry_equal_visitor
|
|||
|
||||
for (auto const& ls : zip_crange(mls1, mls2))
|
||||
{
|
||||
(*this)(ls.get<0>(),ls.get<1>());
|
||||
(*this)(ls.template get<0>(),ls.template get<1>());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template <typename T>
|
||||
void operator() (multi_polygon<T> const& mpoly1, multi_polygon<T> const& mpoly2)
|
||||
{
|
||||
|
@ -164,10 +164,10 @@ struct geometry_equal_visitor
|
|||
|
||||
for (auto const& poly : zip_crange(mpoly1, mpoly2))
|
||||
{
|
||||
(*this)(poly.get<0>(),poly.get<1>());
|
||||
(*this)(poly.template get<0>(),poly.template get<1>());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template <typename T>
|
||||
void operator() (mapnik::util::recursive_wrapper<geometry_collection<T> > const& c1_, mapnik::util::recursive_wrapper<geometry_collection<T> > const& c2_)
|
||||
{
|
||||
|
@ -180,10 +180,10 @@ struct geometry_equal_visitor
|
|||
|
||||
for (auto const& g : zip_crange(c1, c2))
|
||||
{
|
||||
assert_g_equal(g.get<0>(),g.get<1>());
|
||||
assert_g_equal(g.template get<0>(),g.template get<1>());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template <typename T>
|
||||
void operator() (geometry_collection<T> const& c1, geometry_collection<T> const& c2)
|
||||
{
|
||||
|
@ -194,7 +194,7 @@ struct geometry_equal_visitor
|
|||
|
||||
for (auto const& g : zip_crange(c1, c2))
|
||||
{
|
||||
assert_g_equal(g.get<0>(),g.get<1>());
|
||||
assert_g_equal(g.template get<0>(),g.template get<1>());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue