mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-03-23 04:15:15 +00:00
Rename option to --detect-shared-borders and add a test
This commit is contained in:
parent
7258643d5a
commit
896c9d8398
@ -1,3 +1,7 @@
|
||||
## 1.14.3
|
||||
|
||||
* Add --detect-shared-borders option for better polygon simplification
|
||||
|
||||
## 1.14.2
|
||||
|
||||
* Enforce that string feature attributes must be encoded as UTF-8
|
||||
|
@ -125,6 +125,7 @@ resolution is obtained than by using a smaller _maxzoom_ or _detail_.
|
||||
* -al or --drop-lines: Let "dot" dropping at lower zooms apply to lines too
|
||||
* -ap or --drop-polygons: Let "dot" dropping at lower zooms apply to polygons too
|
||||
* -ag or --calculate-feature-density: Add a new attribute, `tippecanoe_feature_density`, to each feature, to record how densely features are spaced in that area of the tile. You can use this attribute in the style to produce a glowing effect where points are densely packed. It can range from 0 in the sparsest areas to 255 in the densest.
|
||||
* -ab or --detect-shared-borders: In the manner of [TopoJSON](https://github.com/mbostock/topojson/wiki/Introduction), detect borders that are shared between multiple polygons and simplify them identically in each polygon. This takes more time and memory than considering each polygon individually.
|
||||
|
||||
### Doing less
|
||||
|
||||
@ -253,12 +254,12 @@ lower resolutions before failing if it still doesn't fit.
|
||||
Development
|
||||
-----------
|
||||
|
||||
Requires sqlite3 (should already be installed on MacOS). Rebuilding the manpage
|
||||
Requires sqlite3 and zlib (should already be installed on MacOS). Rebuilding the manpage
|
||||
uses md2man (`gem install md2man`).
|
||||
|
||||
Linux:
|
||||
|
||||
sudo apt-get install libsqlite3-dev
|
||||
sudo apt-get install libsqlite3-dev zlib1g-dev
|
||||
|
||||
Then build:
|
||||
|
||||
|
2
main.cpp
2
main.cpp
@ -1801,7 +1801,7 @@ int main(int argc, char **argv) {
|
||||
{"drop-polygons", no_argument, &additional[A_POLYGON_DROP], 1},
|
||||
{"prefer-radix-sort", no_argument, &additional[A_PREFER_RADIX_SORT], 1},
|
||||
{"calculate-feature-density", no_argument, &additional[A_CALCULATE_FEATURE_DENSITY], 1},
|
||||
{"simplify-polygons-together", no_argument, &additional[A_SIMPLIFY_TOGETHER], 1},
|
||||
{"detect-shared-borders", no_argument, &additional[A_DETECT_SHARED_BORDERS], 1},
|
||||
|
||||
{"no-line-simplification", no_argument, &prevent[P_SIMPLIFY], 1},
|
||||
{"simplify-only-low-zooms", no_argument, &prevent[P_SIMPLIFY_LOW], 1},
|
||||
|
@ -148,6 +148,8 @@ which may not be what you want.
|
||||
\-ap or \-\-drop\-polygons: Let "dot" dropping at lower zooms apply to polygons too
|
||||
.IP \(bu 2
|
||||
\-ag or \-\-calculate\-feature\-density: Add a new attribute, \fB\fCtippecanoe_feature_density\fR, to each feature, to record how densely features are spaced in that area of the tile. You can use this attribute in the style to produce a glowing effect where points are densely packed. It can range from 0 in the sparsest areas to 255 in the densest.
|
||||
.IP \(bu 2
|
||||
\-ab or \-\-detect\-shared\-borders: In the manner of TopoJSON \[la]https://github.com/mbostock/topojson/wiki/Introduction\[ra], detect borders that are shared between multiple polygons and simplify them identically in each polygon. This takes more time and memory than considering each polygon individually.
|
||||
.RE
|
||||
.SS Doing less
|
||||
.RS
|
||||
@ -289,14 +291,14 @@ If a tile is larger than 500K, it will try encoding that tile at progressively
|
||||
lower resolutions before failing if it still doesn't fit.
|
||||
.SH Development
|
||||
.PP
|
||||
Requires sqlite3 (should already be installed on MacOS). Rebuilding the manpage
|
||||
Requires sqlite3 and zlib (should already be installed on MacOS). Rebuilding the manpage
|
||||
uses md2man (\fB\fCgem install md2man\fR).
|
||||
.PP
|
||||
Linux:
|
||||
.PP
|
||||
.RS
|
||||
.nf
|
||||
sudo apt\-get install libsqlite3\-dev
|
||||
sudo apt\-get install libsqlite3\-dev zlib1g\-dev
|
||||
.fi
|
||||
.RE
|
||||
.PP
|
||||
|
@ -4,7 +4,7 @@
|
||||
#define A_LINE_DROP ((int) 'l')
|
||||
#define A_DEBUG_POLYGON ((int) 'd')
|
||||
#define A_POLYGON_DROP ((int) 'p')
|
||||
#define A_SIMPLIFY_TOGETHER ((int) 't')
|
||||
#define A_DETECT_SHARED_BORDERS ((int) 'b')
|
||||
#define A_PREFER_RADIX_SORT ((int) 'R')
|
||||
#define A_CALCULATE_FEATURE_DENSITY ((int) 'g')
|
||||
|
||||
|
8
tests/border/in.json
Normal file
8
tests/border/in.json
Normal file
File diff suppressed because one or more lines are too long
52
tests/border/out/-z1_--detect-shared-borders.json
Normal file
52
tests/border/out/-z1_--detect-shared-borders.json
Normal file
File diff suppressed because one or more lines are too long
4
tile.cpp
4
tile.cpp
@ -463,7 +463,7 @@ void *partial_feature_worker(void *v) {
|
||||
}
|
||||
|
||||
bool already_marked = false;
|
||||
if (additional[A_SIMPLIFY_TOGETHER] && t == VT_POLYGON) {
|
||||
if (additional[A_DETECT_SHARED_BORDERS] && t == VT_POLYGON) {
|
||||
already_marked = true;
|
||||
}
|
||||
|
||||
@ -1306,7 +1306,7 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
|
||||
}
|
||||
}
|
||||
|
||||
if (additional[A_SIMPLIFY_TOGETHER]) {
|
||||
if (additional[A_DETECT_SHARED_BORDERS]) {
|
||||
find_common_edges(partials, z, line_detail, simplification, maxzoom);
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
#define VERSION "tippecanoe v1.14.2\n"
|
||||
#define VERSION "tippecanoe v1.14.3\n"
|
||||
|
Loading…
x
Reference in New Issue
Block a user