mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-06 10:25:41 +02:00
Make it a little thicker.
Don't change the tiny polygon rules unless the option is set
This commit is contained in:
+5
-1
@@ -197,6 +197,9 @@ drawvec reduce_tiny_poly(drawvec &geom, int z, int detail, bool *still_needs_sim
|
|||||||
|
|
||||||
double area = get_area(geom, i, j);
|
double area = get_area(geom, i, j);
|
||||||
|
|
||||||
|
// if we are trying to salvage polygons that would otherwise drop out,
|
||||||
|
// also raise the standards for what can qualify as polygon dust
|
||||||
|
if (additional[A_BUFFER_POLYGONS_OUTWARD]) {
|
||||||
long long minx = LLONG_MAX;
|
long long minx = LLONG_MAX;
|
||||||
long long maxx = LLONG_MIN;
|
long long maxx = LLONG_MIN;
|
||||||
long long miny = LLONG_MAX;
|
long long miny = LLONG_MAX;
|
||||||
@@ -207,12 +210,13 @@ drawvec reduce_tiny_poly(drawvec &geom, int z, int detail, bool *still_needs_sim
|
|||||||
miny = std::min(miny, (long long) d.y);
|
miny = std::min(miny, (long long) d.y);
|
||||||
maxy = std::max(maxy, (long long) d.y);
|
maxy = std::max(maxy, (long long) d.y);
|
||||||
}
|
}
|
||||||
if (area > 0 && area <= pixel * pixel && area < (maxx - minx) * (maxy - miny) / 5) {
|
if (area > 0 && area <= pixel * pixel && area < (maxx - minx) * (maxy - miny) / 3) {
|
||||||
// if the polygon doesn't use most of its area,
|
// if the polygon doesn't use most of its area,
|
||||||
// don't let it be dust, because the shape is
|
// don't let it be dust, because the shape is
|
||||||
// probably something weird and interesting.
|
// probably something weird and interesting.
|
||||||
area = pixel * pixel * 2;
|
area = pixel * pixel * 2;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// XXX There is an ambiguity here: If the area of a ring is 0 and it is followed by holes,
|
// XXX There is an ambiguity here: If the area of a ring is 0 and it is followed by holes,
|
||||||
// we don't know whether the area-0 ring was a hole too or whether it was the outer ring
|
// we don't know whether the area-0 ring was a hole too or whether it was the outer ring
|
||||||
|
|||||||
@@ -614,7 +614,7 @@ void *partial_feature_worker(void *v) {
|
|||||||
drawvec geom = (*partials)[i].geoms[0];
|
drawvec geom = (*partials)[i].geoms[0];
|
||||||
|
|
||||||
if (additional[A_BUFFER_POLYGONS_OUTWARD] && t == VT_POLYGON) {
|
if (additional[A_BUFFER_POLYGONS_OUTWARD] && t == VT_POLYGON) {
|
||||||
geom = buffer_poly(geom, (1LL << (32 - z - out_detail)) * sqrt(2) / 2, z, (*partials)[i].tx, (*partials)[i].ty, a->shared_nodes_map, a->nodepos);
|
geom = buffer_poly(geom, (1LL << (32 - z - out_detail)) * sqrt(2), z, (*partials)[i].tx, (*partials)[i].ty, a->shared_nodes_map, a->nodepos);
|
||||||
}
|
}
|
||||||
|
|
||||||
to_tile_scale(geom, z, out_detail);
|
to_tile_scale(geom, z, out_detail);
|
||||||
|
|||||||
Reference in New Issue
Block a user