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:
Claude
2026-11-30 21:38:40 +00:00
parent 4352b1498f
commit c062c4a240
3 changed files with 42 additions and 19 deletions
+1 -1
View File
@@ -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);
}