mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-05 18:05:42 +02:00
Optimize away deltas of 0
This commit is contained in:
@@ -130,12 +130,14 @@ void write_tile(struct index *start, struct index *end, char *metabase, unsigned
|
|||||||
int dx = wwx - px;
|
int dx = wwx - px;
|
||||||
int dy = wwy - py;
|
int dy = wwy - py;
|
||||||
|
|
||||||
feature->add_geometry((dx << 1) ^ (dx >> 31));
|
if (dx != 0 || dy != 0 || length == 0) {
|
||||||
feature->add_geometry((dy << 1) ^ (dy >> 31));
|
feature->add_geometry((dx << 1) ^ (dx >> 31));
|
||||||
|
feature->add_geometry((dy << 1) ^ (dy >> 31));
|
||||||
|
|
||||||
px = wwx;
|
px = wwx;
|
||||||
py = wwy;
|
py = wwy;
|
||||||
length++;
|
length++;
|
||||||
|
}
|
||||||
|
|
||||||
//printf("%lld,%lld ", wwx, wwy);
|
//printf("%lld,%lld ", wwx, wwy);
|
||||||
} else if (op == VT_CLOSEPATH) {
|
} else if (op == VT_CLOSEPATH) {
|
||||||
|
|||||||
Reference in New Issue
Block a user