mirror of
https://github.com/felt/tippecanoe.git
synced 2026-12-05 06:41:41 +01:00
Identify features for shared-edge detection by layer, segment, and seq
Features don't necessarily have IDs, and sequence numbers are only unique within a layer and a reading segment: the flatgeobuf, geobuf, and CSV readers start every segment's sequence at the same offset and parse in parallel, so two different features can have the same seq. Record all three in each vertex record, and only count an edge as shared if it is part of polygons that differ in any of them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CQ6vQUJtmGZnqz7RmVYQaJ
This commit is contained in:
+1
-1
@@ -526,7 +526,7 @@ int serialize_feature(struct serialization_state *sst, serial_feature &sf, std::
|
||||
scaled_geometry[(k - i + 0) % (j - i - 1) + i],
|
||||
scaled_geometry[(k - i + 1) % (j - i - 1) + i],
|
||||
scaled_geometry[(k - i + 2) % (j - i - 1) + i],
|
||||
*(sst->layer_seq));
|
||||
*(sst->layer_seq), sf.layer, sf.segment);
|
||||
|
||||
fwrite_check((char *) &v, sizeof(struct vertex), 1, r->vertexfile, &r->vertexpos, sst->fname);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user