roads at z5–z6 is the other half of coarse-zoom tile weight #10
Labels
No labels
claude-wip
map-report
map:is
map:se
needs-review
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
art/ismap#10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The z5 tile covering all of Sweden carries 17 644 road segments (430 kB) even though
the zoom filters have already reduced it to motorway + trunk. That is simply how much
motorway and trunk there is in two countries.
Thinning further means one of:
trunkat z5 (a cartographic decision — at z5 a country is a few hundredpixels wide, so arguably only motorways belong);
simplify_linetolerance is
pixelSize / 2everywhere today).Measure before choosing. Decode the z5 tile and see whether the bytes are feature count
or vertex count — the two options attack different halves, and the answer probably differs
between Sweden (sparse, huge) and Poland (compact, dense).
Related: the
railwaysissue is the larger win in the same tile. Background:docs/performance.md.railwaysat coarse zoom — it is now the biggest thing in a continental tile #9Fixed on
mainasc8621b0.Measured first, as the issue asked — and the answer rules out both options it lists.
Both "drop
trunkat z5" and "simplify harder" attack vertex count. The bytes werefeature count:
roadscarries 2.00 points per feature at z5, z6 and z7 in bothlarge countries (78 003 features for Sweden at z5, 22 701 for Poland). The layer is not
over-detailed, it is over-divided — the same disease as #9, and
merge_linesis thesame cure. No cartographic decision about
trunkwas needed.New
merge_from_zoom, set to 12. The boundary is a data fact, not a budget — and thecaveat I left in CLAUDE.md after #9, that
ST_Collectwould need a spatial split, wassimply wrong. GEOS merges Sweden's whole 2.19M-row z13 table in 12 s and Poland's largest
z14 group (3.23M rows, 37M points) in 21 s. The real reason not to go higher is that the
merge has nothing to do up there: that 3.23M-row
servicegroup yields 2.93M chains — a9% return for ~9 GB of backend memory — because driveways and parking aisles do not
join end to end. One zoom lower the z13 filter has dropped the class, and the same
operation returns 11×.
Whole-tile across this and #9: z5 over central Europe 790 kB → 529 kB → 182 kB, z11
over Stockholm 370 kB → 95 kB.
Verified by rendering the same camera over Poland at z6 before and after and diffing the
images: 2.5% of pixels differ and every one is on the edge of a line — same network,
same routes, no gaps. 306 kB of that tile was the cost of drawing an identical picture out
of 40× more features. The ~21% of motorway length that
parallel_merge_pixels: 1removes is the second carriageway of a dual carriageway; Iceland, which has almost none,
loses 0.1%, and only 39 km of Sweden's 10 195 km of motorway ends further than one pixel
from a drawn line.
Follow-ups filed from what this exposed: the coarse-tile leader is now
cover, andwaterways/transithave the identical 2.0-points-per-feature signature.waterwaysandtransithave the same over-division as roads and rail #27