mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-06 02:15:41 +02:00
Merge any leftover feature remnants onto some feature.
Add a test for coalescing small features onto large ones.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
## 1.25.0
|
||||||
|
|
||||||
|
* Add --coalesce-smallest-as-needed strategy for reducing tile sizes
|
||||||
|
* Add --stats option to tipppecanoe-decode
|
||||||
|
|
||||||
## 1.24.1
|
## 1.24.1
|
||||||
|
|
||||||
* Limit the size and depth of the string pool for better performance
|
* Limit the size and depth of the string pool for better performance
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1575,7 +1575,7 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
|
|||||||
|
|
||||||
if (coalesced_geometry.size() != 0) {
|
if (coalesced_geometry.size() != 0) {
|
||||||
for (ssize_t i = coalesced_geometry.size() - 1; i >= 0; i--) {
|
for (ssize_t i = coalesced_geometry.size() - 1; i >= 0; i--) {
|
||||||
if (coalesced_geometry[i].t == sf.t) {
|
if (coalesced_geometry[i].t == sf.t && coalesced_geometry[i].layer == sf.layer) {
|
||||||
for (size_t j = 0; j < coalesced_geometry[i].geometry.size(); j++) {
|
for (size_t j = 0; j < coalesced_geometry[i].geometry.size(); j++) {
|
||||||
sf.geometry.push_back(coalesced_geometry[i].geometry[j]);
|
sf.geometry.push_back(coalesced_geometry[i].geometry[j]);
|
||||||
}
|
}
|
||||||
@@ -1639,6 +1639,20 @@ long long write_tile(FILE *geoms, long long *geompos_in, char *metabase, char *s
|
|||||||
merge_previndex = sf.index;
|
merge_previndex = sf.index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Attach any pieces that were waiting to be coalesced onto some features that did make it.
|
||||||
|
for (ssize_t i = coalesced_geometry.size() - 1; i >= 0; i--) {
|
||||||
|
for (size_t j = 0; j < partials.size(); j++) {
|
||||||
|
if (partials[j].layer == coalesced_geometry[i].layer && partials[j].t == coalesced_geometry[i].t) {
|
||||||
|
for (size_t k = 0; k < coalesced_geometry[i].geometry.size(); k++) {
|
||||||
|
partials[j].geoms[0].push_back(coalesced_geometry[i].geometry[k]);
|
||||||
|
}
|
||||||
|
|
||||||
|
coalesced_geometry.erase(coalesced_geometry.begin() + i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (prefilter != NULL) {
|
if (prefilter != NULL) {
|
||||||
json_end(prefilter_jp);
|
json_end(prefilter_jp);
|
||||||
if (fclose(prefilter_read_fp) != 0) {
|
if (fclose(prefilter_read_fp) != 0) {
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
#ifndef VERSION_HPP
|
#ifndef VERSION_HPP
|
||||||
#define VERSION_HPP
|
#define VERSION_HPP
|
||||||
|
|
||||||
#define VERSION "tippecanoe v1.24.1\n"
|
#define VERSION "tippecanoe v1.25.0\n"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user