chore: release v1.0.0 - ESM-only, analytical antimeridian splitting, fix antimeridian low npoints split#79
Open
thomas-hervey wants to merge 15 commits intomainfrom
Open
chore: release v1.0.0 - ESM-only, analytical antimeridian splitting, fix antimeridian low npoints split#79thomas-hervey wants to merge 15 commits intomainfrom
thomas-hervey wants to merge 15 commits intomainfrom
Conversation
…n splitting - Remove bHasBigDiff / dfMaxSmallDiffLong / dfDateLineOffset heuristic - Bisect for exact crossing fraction via interpolate() (50 iterations) - Insert [±180, lat*] boundary points; npoints ≤ 2 keeps current behavior - Fixes issue #75: low npoints (e.g. 10) no longer skips the split - Tighten test assertions: SPLIT_NPOINTS constant, directional ±180 checks
Addresses Copilot review comment — adds coords.length === 2 check to assertSplitAtAntimeridian to guard against false positives from 3+ segment splits.
- Routes 2-5 (antimeridian crossers): replace stale coordinate snapshots with semantic assertions (Feature type, properties pass-through, WKT contains two LINESTRING parts). Splitting correctness is owned by antimeridian.test.ts. - Southern hemisphere filter: switch to coordinate comparison (start.y < 0 || end.y < 0) and flatten MultiLineString coordinates before .some() to fix number[][][] vs number[][] traversal bug. - Add south-to-south antimeridian crossing coverage: Sydney ↔ Buenos Aires at npoints=10 and 100 in both directions. - Reformat antimeridian.test.ts to consistent 2-space indentation. - Add geographic place names to all routes for maintainer clarity.
The GDAL-ported dateline splitting heuristic was removed when the analytical bisection approach was introduced. No remaining code derives from GDAL, so delete GDAL-LICENSE.md, remove it from the package.json files list, drop the file-level attribution block in great-circle.ts, and remove the GDAL references from README.md.
test: add antimeridian splitting tests for low npoints values
Mark ArcOptions.offset as @deprecated no-op. Remove non-existent test:build / test:all scripts and CJS/UMD bundle references from DEVELOPING.md.
Strip { offset } from all Arc() call sites — the field is a no-op
since the GDAL heuristic was replaced. Keep the backwards-compat type
assertion in typescript.test.ts with an explanatory comment. Update
README Dateline Crossing section and remove the offset UI control from
index.html.
Arc() with no argument previously returned a 2-point LineString (the <= 2 fallback). A default of 100 produces a usable great circle arc out of the box, consistent with the library's intent.
Consolidates inline coordinate constants, route arrays, and test property helpers into a single source of truth. All test files now import from test/fixtures/routes.ts, eliminating duplication and making fixture coverage reviewable in one place.
Generates a GeoJSON FeatureCollection of all test fixtures using the library itself (actual great circle arcs, not straight lines). Documents usage in DEVELOPING.md.
…tion Quantifies the performance cost of the analytical antimeridian bisection vs the prior GDAL linear interpolation approach. Runnable via `node scripts/benchmark.mjs` after `npm run build`.
…ments - Extract 50-iteration bisection count into ANTIMERIDIAN_BISECTION_ITERATIONS constant - Add inline comments explaining each phase of the Arc() algorithm - Clean up comments across src/ for clarity and consistency - Add Thomas Hervey to contributors in package.json
docs: remove deprecated offset option and GDAL attribution
Collaborator
Author
|
@springmeyer @jgravois this is the PR to release v1.0.0. Double check the CHANGELOG for me and let me know if you see any issues before I merge and npm publish. Thanks! |
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.
No description provided.