Skip to content

fix: use representative postal-code points for Spain - #99

Closed
jkrenge wants to merge 1 commit into
masterfrom
codex/esp-geocodes
Closed

jkrenge wants to merge 1 commit into
masterfrom
codex/esp-geocodes

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.


The return-location distance use case needs approximate postal-code points. Spain previously returned the first locality for repeated codes.

Use the 2026-11-04 GeoNames ES export (CC BY 4.0) and store one point for each of 11,150 postal codes, derived from 37,867 source rows. Average distinct coordinate pairs per code so repeated aliases do not add weight. Preserve string coordinates, leading zeros, existing parsing, and [longitude, latitude] order. No runtime or other-country changes.

These are estimated locality representative points, not postal-area centroids. National completeness and a positional error bound are not established. Source, license, archive checksum, rebuild instructions, primary-source postal association checks, and limits are in docs/geocode-ESP.md.

Validation: all 98 tests pass; lint, format:check, validate:data, and diff whitespace checks pass. Data validation retains two existing AUT/BEL warnings. ESP tests cover mainland, islands, autonomous cities, leading zeros, unknown codes, uniqueness, bounds, and a multiple-locality mean. The generator checks duplicate weighting with assertions.

No merge or deployment. No shared runtime-file overlap with other country work.

@jkrenge
jkrenge requested a review from a team as a code owner November 4, 2026 22:02
@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:03:43.437170Z 0669f5d 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