mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 16:35:40 +02:00
Make feature ordering cooperate with --retain-points-multiplier (#188)
* Make feature ordering cooperate with --retain-points-multiplier * Forgot to check in the actual code changes??? * Sort within each multiplier cluster as well as between clusters * Correct description of behavior in changelog * Drag original feature sequence along in megatiles for post-filter sort * Plumb the preserve-input-order flag through overzoom * Sort in overzoom if requested * Use within-tile input sequence numbers, not global sequence numbers * Documentation * Reverse direction of search to prevent accidental skipping * Add some comments about converting between attribute representations
This commit is contained in:
+2
-12
@@ -187,7 +187,6 @@ std::string serialize_feature(serial_feature *sf, long long wx, long long wy) {
|
||||
#define FLAG_LAYER 7
|
||||
|
||||
#define FLAG_LABEL_POINT 6
|
||||
#define FLAG_SEQ 5
|
||||
#define FLAG_INDEX 4
|
||||
#define FLAG_EXTENT 3
|
||||
#define FLAG_ID 2
|
||||
@@ -197,7 +196,6 @@ std::string serialize_feature(serial_feature *sf, long long wx, long long wy) {
|
||||
long long layer = 0;
|
||||
layer |= sf->layer << FLAG_LAYER;
|
||||
layer |= (sf->label_point != 0) << FLAG_LABEL_POINT;
|
||||
layer |= (sf->seq != 0) << FLAG_SEQ;
|
||||
layer |= (sf->index != 0) << FLAG_INDEX;
|
||||
layer |= (sf->extent != 0) << FLAG_EXTENT;
|
||||
layer |= sf->has_id << FLAG_ID;
|
||||
@@ -205,9 +203,7 @@ std::string serialize_feature(serial_feature *sf, long long wx, long long wy) {
|
||||
layer |= sf->has_tippecanoe_maxzoom << FLAG_MAXZOOM;
|
||||
|
||||
serialize_long_long(s, layer);
|
||||
if (sf->seq != 0) {
|
||||
serialize_long_long(s, sf->seq);
|
||||
}
|
||||
serialize_long_long(s, sf->seq);
|
||||
if (sf->has_tippecanoe_minzoom) {
|
||||
serialize_int(s, sf->tippecanoe_minzoom);
|
||||
}
|
||||
@@ -252,9 +248,7 @@ serial_feature deserialize_feature(std::string &geoms, unsigned z, unsigned tx,
|
||||
deserialize_long_long(&cp, &sf.layer);
|
||||
|
||||
sf.seq = 0;
|
||||
if (sf.layer & (1 << FLAG_SEQ)) {
|
||||
deserialize_long_long(&cp, &sf.seq);
|
||||
}
|
||||
deserialize_long_long(&cp, &sf.seq);
|
||||
|
||||
sf.tippecanoe_minzoom = -1;
|
||||
sf.tippecanoe_maxzoom = -1;
|
||||
@@ -683,10 +677,6 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf) {
|
||||
*(sst->area_sum) += extent;
|
||||
}
|
||||
|
||||
if (!prevent[P_INPUT_ORDER]) {
|
||||
sf.seq = 0;
|
||||
}
|
||||
|
||||
unsigned long long bbox_index;
|
||||
long long midx, midy;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user