Skip to content

Commit

Permalink
A little cleanup; changelog and version; test
Browse files Browse the repository at this point in the history
  • Loading branch information
e-n-f committed Nov 1, 2024
1 parent 08addd3 commit 00321b9
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 2.66.0

* Only bin by ID, not by geometry, if --bin-by-id-list is specified
* Do attribute accumulation in overzoom in mvt_value instead of converting to serial_val

# 2.65.0

* Improve spatial distribution of --retain-points-multiplier features
Expand Down
3 changes: 3 additions & 0 deletions attribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ void preserve_attribute(attribute_op const &op, std::string const &key, serial_v
full_values.push_back(sv);
}

// This is exactly the same logic as preserve_attribute above,
// but with mvt_value instead of serial_val, since overzoom doesn't
// need anything in serial_val form.
void preserve_attribute(attribute_op const &op, std::string const &key, mvt_value const &val, std::vector<std::string> &full_keys, std::vector<mvt_value> &full_values, std::unordered_map<std::string, accum_state> &attribute_accum_state) {
for (size_t i = 0; i < full_keys.size(); i++) {
if (key == full_keys[i]) {
Expand Down
4 changes: 3 additions & 1 deletion clip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1623,7 +1623,9 @@ mvt_tile assign_to_bins(mvt_tile &features,

active.insert(std::move(a));
} else if (e.kind == index_event::CHECK) {
continue; // only bin by id, not geometrically
if (bin_by_id_list.size() > 0) {
continue; // only bin by id, not geometrically
}

auto const &feature = features.layers[e.layer].features[e.feature];

Expand Down
2 changes: 0 additions & 2 deletions tests/pbf/bin-11-327-791-ids.pbf.out.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
{ "type": "Feature", "properties": { "bin-ids": "236,237,510,514", "ZCTA5CE10": "94129", "GEOID10": "94129", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 5968455, "AWATER10": 14697, "INTPTLAT10": "+37.7973402", "INTPTLON10": "-122.4644664", "tippecanoe:count": 4 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -122.477818, 37.811005 ], [ -122.476444, 37.810869 ], [ -122.476101, 37.809648 ], [ -122.474728, 37.809241 ], [ -122.472668, 37.808970 ], [ -122.470608, 37.808563 ], [ -122.469234, 37.807750 ], [ -122.468719, 37.807071 ], [ -122.468376, 37.806800 ], [ -122.468204, 37.806936 ], [ -122.468204, 37.806665 ], [ -122.466660, 37.805851 ], [ -122.463570, 37.804901 ], [ -122.461681, 37.804901 ], [ -122.458420, 37.805444 ], [ -122.454472, 37.806529 ], [ -122.452412, 37.806258 ], [ -122.448120, 37.806936 ], [ -122.448120, 37.806393 ], [ -122.448463, 37.806122 ], [ -122.448292, 37.804766 ], [ -122.451553, 37.803409 ], [ -122.450180, 37.802867 ], [ -122.450008, 37.802460 ], [ -122.447605, 37.800697 ], [ -122.447262, 37.798527 ], [ -122.448120, 37.798255 ], [ -122.448292, 37.797848 ], [ -122.447948, 37.797441 ], [ -122.448635, 37.797441 ], [ -122.448635, 37.797034 ], [ -122.447948, 37.796899 ], [ -122.447948, 37.796492 ], [ -122.448978, 37.796356 ], [ -122.447433, 37.795814 ], [ -122.447433, 37.795542 ], [ -122.447777, 37.795407 ], [ -122.448635, 37.795542 ], [ -122.448978, 37.795000 ], [ -122.448635, 37.794728 ], [ -122.447948, 37.793101 ], [ -122.448463, 37.792829 ], [ -122.448635, 37.791880 ], [ -122.470951, 37.787267 ], [ -122.473354, 37.787132 ], [ -122.475586, 37.786725 ], [ -122.479877, 37.786860 ], [ -122.483826, 37.787674 ], [ -122.484512, 37.789167 ], [ -122.483997, 37.789709 ], [ -122.484341, 37.790116 ], [ -122.484341, 37.789709 ], [ -122.485027, 37.789574 ], [ -122.485886, 37.790795 ], [ -122.483654, 37.794050 ], [ -122.482109, 37.798527 ], [ -122.481766, 37.798527 ], [ -122.481937, 37.798798 ], [ -122.481594, 37.798798 ], [ -122.481766, 37.798933 ], [ -122.480221, 37.801375 ], [ -122.479877, 37.802867 ], [ -122.478676, 37.805444 ], [ -122.478333, 37.808156 ], [ -122.477818, 37.808428 ], [ -122.477989, 37.810598 ], [ -122.477646, 37.810598 ], [ -122.477818, 37.811005 ] ], [ [ -122.452583, 37.803274 ], [ -122.452412, 37.803138 ], [ -122.450008, 37.802460 ], [ -122.451210, 37.803138 ], [ -122.452583, 37.803274 ] ] ], [ [ [ -122.466145, 37.806393 ], [ -122.465973, 37.806258 ], [ -122.466660, 37.805851 ], [ -122.466145, 37.806393 ] ] ], [ [ [ -122.469921, 37.809377 ], [ -122.469406, 37.809106 ], [ -122.470093, 37.809241 ], [ -122.469921, 37.809377 ] ] ] ] } }
,
{ "type": "Feature", "properties": { "bin-ids": "529,531", "ZCTA5CE10": "94123", "GEOID10": "94123", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 2646572, "AWATER10": 218721, "INTPTLAT10": "+37.8009336", "INTPTLON10": "-122.4383664", "tippecanoe:count": 2 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -122.443142, 37.809784 ], [ -122.439537, 37.808835 ], [ -122.440910, 37.806936 ], [ -122.435760, 37.807614 ], [ -122.435589, 37.807207 ], [ -122.435589, 37.806936 ], [ -122.433014, 37.807343 ], [ -122.433014, 37.807071 ], [ -122.434387, 37.806936 ], [ -122.434044, 37.806800 ], [ -122.433014, 37.806936 ], [ -122.432842, 37.806800 ], [ -122.434044, 37.806665 ], [ -122.434044, 37.806393 ], [ -122.433872, 37.806122 ], [ -122.433872, 37.805851 ], [ -122.433701, 37.805580 ], [ -122.432671, 37.805715 ], [ -122.432327, 37.805986 ], [ -122.431641, 37.803274 ], [ -122.425289, 37.804088 ], [ -122.424946, 37.803138 ], [ -122.426491, 37.803003 ], [ -122.426319, 37.802053 ], [ -122.424774, 37.802324 ], [ -122.424603, 37.801239 ], [ -122.426147, 37.801104 ], [ -122.425976, 37.800154 ], [ -122.424431, 37.800426 ], [ -122.423744, 37.796628 ], [ -122.433529, 37.795407 ], [ -122.433357, 37.794457 ], [ -122.434902, 37.794322 ], [ -122.435074, 37.795271 ], [ -122.436790, 37.795000 ], [ -122.436619, 37.794050 ], [ -122.440739, 37.793508 ], [ -122.440910, 37.794457 ], [ -122.441769, 37.794322 ], [ -122.441597, 37.793372 ], [ -122.446404, 37.792829 ], [ -122.446232, 37.791880 ], [ -122.447605, 37.791744 ], [ -122.448635, 37.794728 ], [ -122.448978, 37.795000 ], [ -122.448635, 37.795542 ], [ -122.447777, 37.795407 ], [ -122.447433, 37.795542 ], [ -122.447433, 37.795814 ], [ -122.448978, 37.796356 ], [ -122.447948, 37.796492 ], [ -122.447948, 37.796899 ], [ -122.448635, 37.797034 ], [ -122.448635, 37.797441 ], [ -122.447948, 37.797441 ], [ -122.448292, 37.797848 ], [ -122.448120, 37.798255 ], [ -122.447262, 37.798527 ], [ -122.447605, 37.800697 ], [ -122.450008, 37.802460 ], [ -122.450180, 37.802867 ], [ -122.451553, 37.803409 ], [ -122.448292, 37.804766 ], [ -122.448463, 37.806122 ], [ -122.448120, 37.806393 ], [ -122.448120, 37.806936 ], [ -122.448635, 37.808563 ], [ -122.443142, 37.809784 ] ] ], [ [ [ -122.432842, 37.805986 ], [ -122.432842, 37.805851 ], [ -122.433872, 37.805851 ], [ -122.432842, 37.805986 ] ] ], [ [ [ -122.433529, 37.807614 ], [ -122.433529, 37.807478 ], [ -122.435589, 37.807207 ], [ -122.433529, 37.807614 ] ] ], [ [ [ -122.452583, 37.803274 ], [ -122.451210, 37.803138 ], [ -122.450008, 37.802460 ], [ -122.452583, 37.803274 ] ] ], [ [ [ -122.432842, 37.806393 ], [ -122.432842, 37.806122 ], [ -122.433872, 37.806122 ], [ -122.432842, 37.806393 ] ] ], [ [ [ -122.432842, 37.806665 ], [ -122.432842, 37.806529 ], [ -122.434044, 37.806393 ], [ -122.432842, 37.806665 ] ] ], [ [ [ -122.433701, 37.808156 ], [ -122.433701, 37.807885 ], [ -122.433872, 37.807885 ], [ -122.433701, 37.808156 ] ] ] ] } }
,
{ "type": "Feature", "properties": { "ZCTA5CE10": "94107", "GEOID10": "94107", "CLASSFP10": "B5", "MTFCC10": "G6350", "FUNCSTAT10": "S", "ALAND10": 4647665, "AWATER10": 227634, "INTPTLAT10": "+37.7604596", "INTPTLON10": "-122.3997237", "tippecanoe:count": 5 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -122.385120, 37.791337 ], [ -122.381687, 37.783469 ], [ -122.384777, 37.782790 ], [ -122.384777, 37.782519 ], [ -122.387867, 37.782248 ], [ -122.387695, 37.781841 ], [ -122.385635, 37.781976 ], [ -122.385464, 37.781841 ], [ -122.384777, 37.781841 ], [ -122.385464, 37.781705 ], [ -122.385464, 37.781569 ], [ -122.387695, 37.781434 ], [ -122.387524, 37.781027 ], [ -122.384777, 37.781298 ], [ -122.384777, 37.781027 ], [ -122.387524, 37.780891 ], [ -122.387524, 37.780484 ], [ -122.387524, 37.780077 ], [ -122.387524, 37.779670 ], [ -122.387352, 37.779263 ], [ -122.387352, 37.778992 ], [ -122.384777, 37.779127 ], [ -122.384777, 37.778992 ], [ -122.387352, 37.778856 ], [ -122.387352, 37.778585 ], [ -122.387352, 37.778313 ], [ -122.387695, 37.778313 ], [ -122.387695, 37.778177 ], [ -122.390442, 37.777092 ], [ -122.390442, 37.776956 ], [ -122.390270, 37.776685 ], [ -122.392502, 37.775192 ], [ -122.394218, 37.776414 ], [ -122.396450, 37.774650 ], [ -122.396107, 37.774514 ], [ -122.397480, 37.773429 ], [ -122.397823, 37.772343 ], [ -122.398510, 37.772886 ], [ -122.400742, 37.771122 ], [ -122.396622, 37.767865 ], [ -122.393875, 37.766101 ], [ -122.393703, 37.764065 ], [ -122.387867, 37.764337 ], [ -122.387524, 37.760537 ], [ -122.386665, 37.760673 ], [ -122.386322, 37.758094 ], [ -122.385464, 37.758094 ], [ -122.384777, 37.757687 ], [ -122.381344, 37.757959 ], [ -122.381344, 37.756466 ], [ -122.381172, 37.755923 ], [ -122.380829, 37.755516 ], [ -122.380829, 37.755244 ], [ -122.384090, 37.754973 ], [ -122.384090, 37.754701 ], [ -122.383404, 37.754701 ], [ -122.382889, 37.754430 ], [ -122.381516, 37.754566 ], [ -122.380142, 37.754566 ], [ -122.379971, 37.753344 ], [ -122.386837, 37.752937 ], [ -122.386494, 37.750358 ], [ -122.393188, 37.749951 ], [ -122.393188, 37.751444 ], [ -122.395248, 37.751308 ], [ -122.395248, 37.749815 ], [ -122.403831, 37.749408 ], [ -122.402973, 37.752801 ], [ -122.403316, 37.756194 ], [ -122.403831, 37.757144 ], [ -122.406063, 37.759180 ], [ -122.406578, 37.760673 ], [ -122.405376, 37.763116 ], [ -122.405033, 37.764608 ], [ -122.401600, 37.764880 ], [ -122.401428, 37.763523 ], [ -122.400570, 37.763658 ], [ -122.400742, 37.766237 ], [ -122.399712, 37.766237 ], [ -122.399712, 37.766644 ], [ -122.400742, 37.767458 ], [ -122.401772, 37.767458 ], [ -122.402115, 37.769901 ], [ -122.403488, 37.769765 ], [ -122.403831, 37.770036 ], [ -122.399368, 37.773564 ], [ -122.402458, 37.776007 ], [ -122.401943, 37.776414 ], [ -122.403145, 37.777363 ], [ -122.403660, 37.776956 ], [ -122.405548, 37.778449 ], [ -122.395592, 37.786318 ], [ -122.394047, 37.785232 ], [ -122.394218, 37.785097 ], [ -122.393360, 37.784961 ], [ -122.391815, 37.785504 ], [ -122.391472, 37.785639 ], [ -122.391472, 37.785097 ], [ -122.392330, 37.784283 ], [ -122.392159, 37.784147 ], [ -122.388554, 37.786996 ], [ -122.387695, 37.787132 ], [ -122.387867, 37.788760 ], [ -122.386322, 37.790252 ], [ -122.385464, 37.790523 ], [ -122.385635, 37.790930 ], [ -122.385120, 37.791337 ] ] ], [ [ [ -122.384777, 37.779941 ], [ -122.384777, 37.779670 ], [ -122.387524, 37.779670 ], [ -122.384777, 37.779941 ] ] ], [ [ [ -122.384777, 37.780348 ], [ -122.384777, 37.780077 ], [ -122.387524, 37.780077 ], [ -122.384777, 37.780348 ] ] ], [ [ [ -122.384777, 37.780755 ], [ -122.384777, 37.780484 ], [ -122.387524, 37.780484 ], [ -122.384777, 37.780755 ] ] ], [ [ [ -122.384777, 37.779534 ], [ -122.384777, 37.779263 ], [ -122.387352, 37.779263 ], [ -122.384777, 37.779534 ] ] ], [ [ [ -122.385120, 37.778856 ], [ -122.385120, 37.778585 ], [ -122.387352, 37.778585 ], [ -122.385120, 37.778856 ] ] ] ] } }
] }
] }
2 changes: 1 addition & 1 deletion version.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef VERSION_HPP
#define VERSION_HPP

#define VERSION "v2.65.0"
#define VERSION "v2.66.0"

#endif

0 comments on commit 00321b9

Please sign in to comment.