mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-02-08 20:10:15 +00:00
Merge remote-tracking branch 'origin/master' into multilayer
This commit is contained in:
commit
a076c5619d
@ -58,7 +58,7 @@ Options
|
|||||||
* -f: Delete the mbtiles file if it already exists instead of giving an error
|
* -f: Delete the mbtiles file if it already exists instead of giving an error
|
||||||
* -r <i>rate</i>: Rate at which dots are dropped at lower zoom levels (default 2.5)
|
* -r <i>rate</i>: Rate at which dots are dropped at lower zoom levels (default 2.5)
|
||||||
* -b <i>pixels</i>: Buffer size where features are duplicated from adjacent tiles (default 5)
|
* -b <i>pixels</i>: Buffer size where features are duplicated from adjacent tiles (default 5)
|
||||||
* -g <i>gamma</i>: Rate at which especially dense dots are dropped (default 1, for no effect). A gamma of 2 reduces the number of dots less than a pixel apart to the square root of their original number.
|
* -g <i>gamma</i>: Rate at which especially dense dots are dropped (default 0, for no effect). A gamma of 2 reduces the number of dots less than a pixel apart to the square root of their original number.
|
||||||
|
|
||||||
Example
|
Example
|
||||||
-------
|
-------
|
||||||
|
@ -942,7 +942,7 @@ int main(int argc, char **argv) {
|
|||||||
int minzoom = 0;
|
int minzoom = 0;
|
||||||
int force = 0;
|
int force = 0;
|
||||||
double droprate = 2.5;
|
double droprate = 2.5;
|
||||||
double gamma = 1;
|
double gamma = 0;
|
||||||
int buffer = 5;
|
int buffer = 5;
|
||||||
const char *tmpdir = "/tmp";
|
const char *tmpdir = "/tmp";
|
||||||
|
|
||||||
|
6
tile.cc
6
tile.cc
@ -508,11 +508,11 @@ long long write_tile(char **geoms, char *metabase, unsigned *file_bbox, int z, u
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (t == VT_POINT && z < feature_minzoom && gamma == 0) {
|
if (t == VT_POINT && z < feature_minzoom && gamma < 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (t == VT_POINT && gamma != 0) {
|
if (t == VT_POINT && gamma >= 0) {
|
||||||
seq++;
|
seq++;
|
||||||
if (seq >= 0) {
|
if (seq >= 0) {
|
||||||
seq -= interval;
|
seq -= interval;
|
||||||
@ -520,6 +520,7 @@ long long write_tile(char **geoms, char *metabase, unsigned *file_bbox, int z, u
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (gamma > 0) {
|
||||||
unsigned long long index = encode(bbox[0] / 2 + bbox[2] / 2, bbox[1] / 2 + bbox[3] / 2);
|
unsigned long long index = encode(bbox[0] / 2 + bbox[2] / 2, bbox[1] / 2 + bbox[3] / 2);
|
||||||
if (gap > 0) {
|
if (gap > 0) {
|
||||||
if (index == previndex) {
|
if (index == previndex) {
|
||||||
@ -547,6 +548,7 @@ long long write_tile(char **geoms, char *metabase, unsigned *file_bbox, int z, u
|
|||||||
|
|
||||||
previndex = index;
|
previndex = index;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool reduced = false;
|
bool reduced = false;
|
||||||
if (t == VT_POLYGON) {
|
if (t == VT_POLYGON) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user