mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-05-02 09:02:53 +00:00
Update to wagyu-0.2.1 (eec53a6)
This commit is contained in:
parent
b3c116b989
commit
275d25739d
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <sstream>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <mapbox/geometry/wagyu/bound.hpp>
|
#include <mapbox/geometry/wagyu/bound.hpp>
|
||||||
@ -246,7 +247,7 @@ void set_winding_count(active_bound_list_itr<T>& bnd_itr,
|
|||||||
if ((*rev_bnd_itr)->winding_count * (*rev_bnd_itr)->winding_delta < 0) {
|
if ((*rev_bnd_itr)->winding_count * (*rev_bnd_itr)->winding_delta < 0) {
|
||||||
// prev edge is 'decreasing' WindCount (WC) toward zero
|
// prev edge is 'decreasing' WindCount (WC) toward zero
|
||||||
// so we're outside the previous polygon ...
|
// so we're outside the previous polygon ...
|
||||||
if (std::abs((*rev_bnd_itr)->winding_count) > 1) {
|
if (std::abs(static_cast<int>((*rev_bnd_itr)->winding_count)) > 1) {
|
||||||
// outside prev poly but still inside another.
|
// outside prev poly but still inside another.
|
||||||
// when reversing direction of prev poly use the same WC
|
// when reversing direction of prev poly use the same WC
|
||||||
if ((*rev_bnd_itr)->winding_delta * (*bnd_itr)->winding_delta < 0) {
|
if ((*rev_bnd_itr)->winding_delta * (*bnd_itr)->winding_delta < 0) {
|
||||||
@ -320,7 +321,7 @@ bool is_contributing(bound<T> const& bnd,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case fill_type_non_zero:
|
case fill_type_non_zero:
|
||||||
if (std::abs(bnd.winding_count) != 1) {
|
if (std::abs(static_cast<int>(bnd.winding_count)) != 1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -79,10 +79,11 @@ bool build_edge_list(mapbox::geometry::linear_ring<T> const& path_geometry, edge
|
|||||||
// Find next non repeated point going backwards from
|
// Find next non repeated point going backwards from
|
||||||
// end for pt1
|
// end for pt1
|
||||||
while (pt1 == pt2) {
|
while (pt1 == pt2) {
|
||||||
pt1 = *(++itr_rev);
|
++itr_rev;
|
||||||
if (itr_rev == path_geometry.rend()) {
|
if (itr_rev == path_geometry.rend()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
pt1 = *itr_rev;
|
||||||
}
|
}
|
||||||
++itr;
|
++itr;
|
||||||
mapbox::geometry::point<value_type> pt3 = *itr;
|
mapbox::geometry::point<value_type> pt3 = *itr;
|
||||||
|
@ -141,13 +141,13 @@ void intersect_bounds(active_bound_list_itr<T>& b1,
|
|||||||
}
|
}
|
||||||
} else if ((*b1)->poly_type != (*b2)->poly_type) {
|
} else if ((*b1)->poly_type != (*b2)->poly_type) {
|
||||||
// toggle subj open path index on/off when std::abs(clip.WndCnt) == 1
|
// toggle subj open path index on/off when std::abs(clip.WndCnt) == 1
|
||||||
if (((*b1)->winding_delta == 0) && std::abs((*b2)->winding_count) == 1 &&
|
if (((*b1)->winding_delta == 0) && std::abs(static_cast<int>((*b2)->winding_count)) == 1 &&
|
||||||
(cliptype != clip_type_union || (*b2)->winding_count2 == 0)) {
|
(cliptype != clip_type_union || (*b2)->winding_count2 == 0)) {
|
||||||
add_point(b1, active_bounds, pt, rings);
|
add_point(b1, active_bounds, pt, rings);
|
||||||
if (b1Contributing) {
|
if (b1Contributing) {
|
||||||
(*b1)->ring = nullptr;
|
(*b1)->ring = nullptr;
|
||||||
}
|
}
|
||||||
} else if (((*b2)->winding_delta == 0) && (std::abs((*b1)->winding_count) == 1) &&
|
} else if (((*b2)->winding_delta == 0) && (std::abs(static_cast<int>((*b1)->winding_count)) == 1) &&
|
||||||
(cliptype != clip_type_union || (*b1)->winding_count2 == 0)) {
|
(cliptype != clip_type_union || (*b1)->winding_count2 == 0)) {
|
||||||
add_point(b2, active_bounds, pt, rings);
|
add_point(b2, active_bounds, pt, rings);
|
||||||
if (b2Contributing) {
|
if (b2Contributing) {
|
||||||
@ -217,7 +217,7 @@ void intersect_bounds(active_bound_list_itr<T>& b1,
|
|||||||
case fill_type_even_odd:
|
case fill_type_even_odd:
|
||||||
case fill_type_non_zero:
|
case fill_type_non_zero:
|
||||||
default:
|
default:
|
||||||
b1Wc = std::abs((*b1)->winding_count);
|
b1Wc = std::abs(static_cast<int>((*b1)->winding_count));
|
||||||
}
|
}
|
||||||
switch (b2FillType) {
|
switch (b2FillType) {
|
||||||
case fill_type_positive:
|
case fill_type_positive:
|
||||||
@ -229,7 +229,7 @@ void intersect_bounds(active_bound_list_itr<T>& b1,
|
|||||||
case fill_type_even_odd:
|
case fill_type_even_odd:
|
||||||
case fill_type_non_zero:
|
case fill_type_non_zero:
|
||||||
default:
|
default:
|
||||||
b2Wc = std::abs((*b2)->winding_count);
|
b2Wc = std::abs(static_cast<int>((*b2)->winding_count));
|
||||||
}
|
}
|
||||||
if (b1Contributing && b2Contributing) {
|
if (b1Contributing && b2Contributing) {
|
||||||
if ((b1Wc != 0 && b1Wc != 1) || (b2Wc != 0 && b2Wc != 1) ||
|
if ((b1Wc != 0 && b1Wc != 1) || (b2Wc != 0 && b2Wc != 1) ||
|
||||||
@ -269,7 +269,7 @@ void intersect_bounds(active_bound_list_itr<T>& b1,
|
|||||||
case fill_type_even_odd:
|
case fill_type_even_odd:
|
||||||
case fill_type_non_zero:
|
case fill_type_non_zero:
|
||||||
default:
|
default:
|
||||||
b1Wc2 = std::abs((*b1)->winding_count2);
|
b1Wc2 = std::abs(static_cast<int>((*b1)->winding_count2));
|
||||||
}
|
}
|
||||||
switch (b2FillType2) {
|
switch (b2FillType2) {
|
||||||
case fill_type_positive:
|
case fill_type_positive:
|
||||||
@ -281,7 +281,7 @@ void intersect_bounds(active_bound_list_itr<T>& b1,
|
|||||||
case fill_type_even_odd:
|
case fill_type_even_odd:
|
||||||
case fill_type_non_zero:
|
case fill_type_non_zero:
|
||||||
default:
|
default:
|
||||||
b2Wc2 = std::abs((*b2)->winding_count2);
|
b2Wc2 = std::abs(static_cast<int>((*b2)->winding_count2));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((*b1)->poly_type != (*b2)->poly_type) {
|
if ((*b1)->poly_type != (*b2)->poly_type) {
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <sstream>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <queue>
|
#include <queue>
|
||||||
|
|
||||||
#include <mapbox/geometry/wagyu/bound.hpp>
|
#include <mapbox/geometry/wagyu/bound.hpp>
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
#include <execinfo.h>
|
#include <execinfo.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <sstream>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
//
|
//
|
||||||
// void* callstack[128];
|
// void* callstack[128];
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <sstream>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace mapbox {
|
namespace mapbox {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user