Skip to content

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
chore/esm
Open

chore: release v1.0.0 - ESM-only, analytical antimeridian splitting, fix antimeridian low npoints split#79
thomas-hervey wants to merge 15 commits intomainfrom
chore/esm

Conversation

@thomas-hervey
Copy link
Copy Markdown
Collaborator

No description provided.

…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
@thomas-hervey thomas-hervey changed the title Chore/esm chore: release v1.0.0 - ESM-only, analytical antimeridian splitting, fix antimeridian low npoints split Apr 13, 2026
@thomas-hervey
Copy link
Copy Markdown
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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant