mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-02-24 02:41:15 +00:00
Add a flag to let you drop lines at low zooms just like points
This commit is contained in:
parent
12fb2c969c
commit
1381f0f276
@ -83,6 +83,8 @@ Options
|
|||||||
* -pc: Don't coalesce features with the same properties
|
* -pc: Don't coalesce features with the same properties
|
||||||
* -pf: Don't limit tiles to 200,000 features
|
* -pf: Don't limit tiles to 200,000 features
|
||||||
* -pk: Don't limit tiles to 500K bytes
|
* -pk: Don't limit tiles to 500K bytes
|
||||||
|
* -po: Don't reorder features to put the same properties in sequence
|
||||||
|
* -pl: Let "dot" simplification apply to lines too
|
||||||
|
|
||||||
Example
|
Example
|
||||||
-------
|
-------
|
||||||
|
6
tile.cc
6
tile.cc
@ -514,7 +514,7 @@ long long write_tile(char **geoms, char *metabase, unsigned *file_bbox, int z, u
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (t == VT_POINT && gamma >= 0) {
|
if (gamma >= 0 && (t == VT_POINT || (prevent['l' & 0xFF] && t == VT_LINE))) {
|
||||||
seq++;
|
seq++;
|
||||||
if (seq >= 0) {
|
if (seq >= 0) {
|
||||||
seq -= interval;
|
seq -= interval;
|
||||||
@ -611,16 +611,20 @@ long long write_tile(char **geoms, char *metabase, unsigned *file_bbox, int z, u
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (j = 0; j < nlayers; j++) {
|
for (j = 0; j < nlayers; j++) {
|
||||||
|
if (!prevent['o'] & 0xFF) {
|
||||||
std::sort(features[j].begin(), features[j].end());
|
std::sort(features[j].begin(), features[j].end());
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<coalesce> out;
|
std::vector<coalesce> out;
|
||||||
unsigned x;
|
unsigned x;
|
||||||
for (x = 0; x < features[j].size(); x++) {
|
for (x = 0; x < features[j].size(); x++) {
|
||||||
unsigned y = out.size() - 1;
|
unsigned y = out.size() - 1;
|
||||||
|
|
||||||
|
#if 0
|
||||||
if (out.size() > 0 && coalcmp(&features[j][x], &out[y]) < 0) {
|
if (out.size() > 0 && coalcmp(&features[j][x], &out[y]) < 0) {
|
||||||
fprintf(stderr, "\nfeature out of order\n");
|
fprintf(stderr, "\nfeature out of order\n");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!prevent['c' & 0xFF] && out.size() > 0 && out[y].geom.size() + features[j][x].geom.size() < 20000 && coalcmp(&features[j][x], &out[y]) == 0 && features[j][x].type != VT_POINT) {
|
if (!prevent['c' & 0xFF] && out.size() > 0 && out[y].geom.size() + features[j][x].geom.size() < 20000 && coalcmp(&features[j][x], &out[y]) == 0 && features[j][x].type != VT_POINT) {
|
||||||
unsigned z;
|
unsigned z;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user