Guard against duplicate points when generating "sizes" for them

This commit is contained in:
Erica Fischer
2022-08-25 12:21:51 -07:00
parent f11ead5ae6
commit 932c524ebc
2 changed files with 104 additions and 2 deletions
+9 -2
View File
@@ -1876,8 +1876,15 @@ long long write_tile(FILE *geoms, std::atomic<long long> *geompos_in, char *meta
}
if (sf.t == VT_POINT) {
double radius = sqrt(sf.index - extent_previndex) / 4.0;
sf.extent = M_PI * radius * radius;
if (extent_previndex >= sf.index) {
sf.extent = 1;
} else {
double radius = sqrt(sf.index - extent_previndex) / 4.0;
sf.extent = M_PI * radius * radius;
if (sf.extent < 1) {
sf.extent = 1;
}
}
extent_previndex = sf.index;
}