Skip to content

feat: add Czech postal geocoding - #122

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

jkrenge wants to merge 1 commit into
masterfrom
codex/cze-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

CZE previously returned undefined for every postcode. Add approximate full-postcode lookup for return-location distance analysis. The October 2026 parcelLab analysis observed 42,205 provider-coded return tracking records with destination country CZE; this is observed parcelLab volume, not national market share.

CZE postcode (11000 or 110 00)
  → CZE-only normalization
  → representative point [longitude, latitude] as strings

Add 2,694 unique five-digit postcode records from 15,507 GeoNames locality rows. Source: https://download.geonames.org/export/zip/CZ.zip, retrieved 2026-11-04; export timestamp 2026-11-04 03:53 CET, CC BY 4.0 with attribution. Use the unweighted mean of distinct coordinate pairs per code; duplicate source rows do not add weight. See docs/geocode-CZE.md for source hash, reproduction, primary Czech Post checks, and limits.

Evidence

  • Before: coordinates('CZE', '110 00') returned undefined.
  • After: returns ['14.425633', '50.084633']; compact/spaced input, existing country aliases, and all 2,694 output lookups have offline tests.
  • Generator tests cover duplicate independence, row-order independence, and invalid coordinates.
  • npm test, npm run lint, npm run format:check, and npm run validate:data pass. Data validation retains two known AUT/BEL warnings.
  • No region mappings or lib/region.js changes. Other-country behavior and string return values are preserved.

Merge Danger

Door: two-way

Blast Radius: CZE

Source coverage is partial/unverified against a national inventory. Points are locality estimates, not postal-area centroids or scan-site locations; rural errors can be kilometres. No national accuracy bound is available. Six decimal places do not establish accuracy. Primary checks confirm urban/rural/border postcode-locality associations, not postcode-wide coordinate accuracy.

Shared-file overlap with concurrent country PRs is limited to lib/geocode.js (allowlist and normalization). This PR does not merge, publish, or deploy the package.

@jkrenge
jkrenge requested a review from a team as a code owner November 4, 2026 22:17
@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:05.908116Z 5b7a754 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