Skip to content

feat: add Slovakia postal geocoding - #95

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

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


Slovakia postal coordinates

Source: GeoNames SK.zip,
retrieved 2026-11-04. Attribution: GeoNames, https://www.geonames.org/.
License: CC BY 4.0, confirmed in
the postal export readme.
The archive does not specify a dataset revision date.

The source has 5,233 locality rows and 3,480 unique full five-digit postal codes.
Coverage is limited to the codes in this export; national completeness is not
verified. Leading zeros are retained. Output coordinates are decimal-degree
strings, in the existing longitude/latitude lookup order.

For each code, remove duplicate latitude/longitude pairs, then take the unweighted
arithmetic mean of each coordinate and round to six decimal places. This prevents
duplicate locality rows from increasing a point's weight. These are representative
points, not postal-area centroids or address locations. GeoNames can infer points
from place names or neighbouring codes; six decimals do not imply that accuracy.
No distance error bound is available.

To reproduce: read SK.txt as UTF-8 tab-separated rows; use field 2 as the code
(remove its space), fields 10 and 11 as latitude and longitude. Group and aggregate
as above, then sort codes lexically. Validate five digits, finite values, latitude
within [-90, 90], longitude within [-180, 180], and unique output codes.
SHA-256 of SK.txt: cda413bbb5c4d85228b468d786b6a17bcbc3f4bc7322d896c6568db4fa4e1c12.

The GeoNames postal search
provides locality checks: Žilina 010 01 and rural Terchová 013 06. Terchová
retains its source point; Žilina shares its code with other points, so its output
is their mean. These checks confirm source consistency, not independent survey
accuracy. Compact codes and the standard three-digit, space, two-digit form are
supported. Unknown and malformed codes return undefined.

@jkrenge
jkrenge requested a review from a team as a code owner November 4, 2026 22:01
@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:00.861311Z 6cc5c6a 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.

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