Carry the files a cell references, and let a note area answer a pick - #39
Merged
Conversation
A feature can name a text file or a picture instead of carrying it: TXTDSC and
NTXTDS name text, PICREP names a picture, and S-101 puts the same in a
fileReference. The bake dropped them, so a pick report could show the name of a
caution note and nothing else.
The bake now writes each chart into its own directory, the shape an exchange
set uses, with the files that chart references beside it and an index.json:
out/US5GU3TC/US5GU3TC.pmtiles
out/US5GU3TC/US299TCA.TXT
out/US5GU3TC/index.json
That drops the tiles/ level, which held nothing once a chart owns a directory.
The partition stores cell names, not paths, so it is unaffected. --no-aux skips
the files.
tile57_aux_open, tile57_aux_get and tile57_aux_close read them. A client goes
through the ABI rather than the disk, so the layout stays ours to change. The
lookup ignores case and any directory part, because S-57 upper-cases the
reference and exchange sets differ across filesystems.
A picture is stored as it arrives. The Go predecessor transcoded TIFF to PNG
for the browser; every native client decodes TIFF, and the manifest states the
type.
The directory walker reuses one buffer for the entry path, so every collected file borrowed the same slice. The four files of a cell all ended up under the last name the walker had seen, each overwriting the last, and the manifest listed that one name four times.
Local work in progress does not belong in a commit.
The pick replays the drawing, so an area that draws nothing but its INFORM01 marker — M_NPUB, and any area that carries INFORM or TXTDSC — answered only under that marker. A click one glyph away reported the water under it. The bake now stores the rings of such an area on a `pick_areas` layer. Only the query surface reads them; a renderer skips the layer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A feature can name a text file or a picture instead of carrying it: TXTDSC and NTXTDS name text, PICREP names a picture, and S-101 puts the same in a fileReference. The bake dropped them, so a pick report could show the name of a caution note and nothing else.
Each chart now bakes into its own directory, the shape an exchange set uses, holding its archive, the files it references and an index.json:
out/US5GU3TC/withUS5GU3TC.pmtiles,US299TCA.TXTandindex.json. That drops the tiles/ level, which held nothing once a chart owns a directory. The partition stores cell names, not paths, so it is unaffected, and--no-auxskips the files.tile57_aux_open,tile57_aux_getandtile57_aux_closeread them. A client goes through the ABI rather than the disk, so the format stays ours to change. The lookup ignores case and any directory part, because S-57 upper-cases the reference and exchange sets differ across filesystems. A picture is stored as it arrives and the manifest states the type: the Go predecessor transcoded TIFF to PNG for the browser, and every native client decodes TIFF.The pick replays the drawing, so an area that draws nothing but its INFORM01 marker — M_NPUB, and any area that carries INFORM or TXTDSC — answered only under that marker, and a click one glyph away reported the water under it. The bake now stores the rings of such an area on a
pick_areaslayer that only the query surface reads. Across the M_NPUB of US5BPGFB at z12 the note answers at every point inside the polygon and none outside it, where before it answered within 190 m of one point.The tile schema gains a layer and the output gains a directory level, so a chart baked before this carries neither the referenced files nor the pick rings. 356 tests pass;
src/render/render.zignever referencedquery, so that file's tests were not collected, and they are now.