Repository navigation
feat: rotated geographic world reference - #3
Merged
Merged
Conversation
WorldGeoReference.RotationDegrees (-45..45) rotates the local metric plane before it is laid on the tile grid, so a street grid that is not north-aligned imports axis-aligned while source lon/lat stay real. Placement is anchored to the rotated bounds' minimum corner; with no rotation the original formulas run verbatim. SectionBounds and RequiredTiles use the rotated corners. A rotated reference raises the world format to 7; the OSM world import request accepts the rotation and the editor's world-to-lon/lat helper mirrors the core projection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ECCGjSrSADcjxBmXdCBpm
This was referenced Oct 16, 2026
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.
Implements section 1 of the transfer contract (#2).
What changes
WorldGeoReference.RotationDegrees:ProjectandGeographicrun the original formulas verbatim, so existing worlds project bit-identically. A test compares them against the old expression.SectionBoundsis the lon/lat box of the section's four corners, clipped to the reference.RequiredTilesuses the rotated corners.OsmWorldImportRequestgainsRotationDegrees = 0, so the UI can expose it later.worldGeographic(world-geography.js), used by the elevation overlay, mirrors the core projection.Tests
RotatedProjectionTests:SourceFeaturesuntouched.worldGeographicmatches values printed by the C# projection to within 1e-11°; unrotated output is unchanged.dotnet run --project tests/SimplePZMapmaker.Tests(withPZMAP_WORKSPACEset): 338/338 passed;npm test: 184/184 passed.For Pilna this gives 4774×5521 tiles at 1 m/tile with θ = −11.22, using real coordinates instead of the pre-rotated pseudo lon/lat the pipeline used until now.
🤖 Generated with Claude Code
https://claude.ai/code/session_015ECCGjSrSADcjxBmXdCBpm
Generated by Claude Code