Skip to content

feat: add Norwegian postal geocoding - #123

Closed
jkrenge wants to merge 1 commit into
masterfrom
codex/nor-postal-geocoding
Closed

jkrenge wants to merge 1 commit into
masterfrom
codex/nor-postal-geocoding

Conversation

@jkrenge

@jkrenge jkrenge commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by consolidated postal geocoding PR #124. This PR's head commit is retained in the combined branch. Combined CI passes on Node.js 24/26 and static checks.


Summary

Add Norwegian postal lookup for approximate return-location distance analysis. Observed October 2026 parcelLab volume was 70,245 provider-coded return tracking records with recorded destination NOR; this is observed parcelLab volume, not national market share.

coordinates(NOR, full postcode)
  trim outer whitespace and optional NO- prefix
  require four digits
  return [longitude, latitude] strings from 5,092 current code matches

GeoNames supplies locality points under CC BY 4.0; Bring's official NLOD 2.0 register filters current codes. Both were retrieved 2026-11-04. The GeoNames archive member is dated 2026-11-04. Source links, generation steps, coverage, and primary-source sample checks are in docs/geocode-NOR.md.

Evidence

  • Before: NOR was unsupported and returned undefined.
  • After: 5,092 records / unique full four-digit postcodes resolve, including leading zeros and optional case-insensitive NO- prefixes. Unknown and malformed codes return undefined. String coordinate types and other-country behavior are preserved.
  • All 98 offline tests pass. npm run lint, npm run format:check, npm run validate:data, and git diff --check pass. Data validation retains the two existing AUT/BEL warnings.
  • Generator ran against both downloaded sources with count, duplicate, finite-coordinate and range assertions. No new dependencies. No region mappings or lib/region.js changes.

Merge Danger

Door: two-way

Blast Radius: NOR

Coverage is partial: 40 GeoNames codes absent from Bring are excluded and 20 Bring codes lack coordinates. Svalbard 9170 is unsupported. Points represent localities, not postcode centroids, scan locations, or precise physical PO boxes. A rural sample differs from an official address by about 8 km; there is no national error bound. Do not use this alone for fraud decisions or precise distance thresholds.

Shared-file overlap with concurrent country PRs: lib/geocode.js allowlist and normalization. Keep each country's behavior when resolving conflicts. No merge, package publication, or deployment is part of this PR.

@jkrenge
jkrenge requested a review from a team as a code owner November 4, 2026 22:18
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T22:19:42.136608Z 556861d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jkrenge jkrenge closed this Nov 4, 2026
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