Preserve camera direction range spans - #1
Open
anthony-maio wants to merge 1 commit into
Open
Conversation
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.
Summary
Preserves the width of OSM
directionranges so downstream camera maps can render the documented field of view instead of reducing every range to its midpoint.Root Cause
data/cameras/lib.mjsparsed ranges such as239-284into a midpoint but discarded the original 45-degree span. That made the GeoJSON and generated PMTiles indistinguishable from a single-bearing camera.Execution Flow
flowchart LR A[OSM direction range] --> B[Camera parser] B --> C[Hourly GeoJSON] C --> D[Main and filtered PMTiles] D --> E[Maps renderer]Fix
directionSpanfor the first retained direction token.directionSpansfor plural directions when at least one token is a range.directionanddirectionsfields unchanged for compatibility.v9-direction-spansso archives rebuild with the additive properties.Part of FoggedLens/deflock#145. Paired with the consumer PR: FoggedLens/deflockhopper_maps#14
Test plan
node --test data/cameras/*.test.mjs tiles/cameras/*.test.mjs-- 109 tests pass, including atomic rejection of non-finite tokens and derived range overflow.shellcheck tiles/cameras/build.sh tiles/cameras/verify.sh tiles/cameras/verify-filter.sh.git diff --check.