A town is more than its name: identity in a geographic catalogue

Keep a selected place under a stable ID, distinguish identical names and explain changes to coordinates and administrative membership.

Two similar towns on a fictional map represent the difference between a place's name and its identity.

A person enters a town's name, chooses a forecast and saves the page. Some time later, the name changes or the catalogue receives a different spelling. If the application treats the name as an identifier, the saved choice may disappear, create a duplicate or start pointing to another settlement with the same name.

The error can be hard to notice in a weather product: the page still displays plausible numbers. We must answer “which place was selected?” separately from “which coordinates and time should the data request use?” We will examine a small invented geographic catalogue. It contains no real towns, retrieved forecasts or geocoding results; the names and points support decisions about identity.

Two identical names, two choices

The teaching catalogue contains two towns named Lystove. The first belongs to fictional country A and its northern region; the second belongs to country B and its southern region. Their internal identifiers, P1 and P2, differ. Their Ukrainian, Russian and English name variants may also coincide: changing the language does not remove ambiguity.

Place Ukrainian name Selection context Latitude Longitude
P1 Листове Country A, northern region 12.340 45.670
P2 Листове Country B, southern region −12.340 −45.670

These are arbitrary teaching coordinates, not the locations of actual towns. A name search should offer both choices with context. If the user explicitly selects P2, the saved selection should retain P2. The string “Lystove” is suitable for display but insufficient as a reference to a particular place.

Sorting results must not silently perform selection. In the exercise, country, region and place identifiers determine candidate order. This is merely a stable list order. The first row does not become the default answer, and the closest point does not become a confirmed match without a separate policy.

An identifier holds relationships; a name helps discovery

The catalogue creates its own local identifier. A reader's saved choice, a page, notification settings or a source mapping can reference it. In our scenario it is not computed from the name, coordinates or administrative path: all those attributes can change.

This does not mean that a record must remain active forever. The catalogue should be able to mark it closed or requiring clarification while retaining historical relationships. Reusing an old ID for another town would change the meaning of existing saved references. Even a new, attractive page title would not resolve that problem.

The GeoNames data format describes record identifiers, names, coordinates and administrative codes separately. Its alternative-name table adds language and historical information. This illustrates useful field separation without defining continuity policy for our local catalogue. Synthetic P1 and P2 are not GeoNames identifiers.

A name variant has a language and a role

For P1 we define Листове, Листовое and Lystove with locales uk, ru and en. P2 has the same three spellings. Each name record references its own place_id; identical text does not merge the records. A fuller model should also distinguish official, colloquial, abbreviated and historical names.

A fictional change at step 10 renames P1 to New Lystove. The scenario explicitly stipulates that this is the same place. New localized names become current, while old ones remain searchable as historical aliases. A query for “Листове” after the change can still return two results, but the first displays its current name and explains that the match came from an older spelling.

A search key and a result label can therefore differ. The old name should not be presented as current merely because it is what the user entered. Likewise, a missing translation does not create another geographic entity: the product selects an explicit language fallback without presenting it as a completed translation.

The exercise uses predetermined exact spellings. It does not implement transliteration, fuzzy search, typo correction or comparison across every Unicode form. Those capabilities require their own rules and assessment of false matches. Useful search should expand the candidate set while keeping uncertainty visible.

Coordinates are attributes with provenance

A point needs separately named latitude and longitude, a coordinate reference system and a source. Our JSON uses the fields latitude and longitude; their meaning does not depend on how someone habitually writes a pair of numbers. Export to another format must follow that format's ordering contract.

RFC 7946 defines GeoJSON positions as longitude followed by latitude in WGS 84 decimal degrees. The number of digits must not be interpreted as a measure of uncertainty. The teaching point P1 therefore becomes [45.670, 12.340] in GeoJSON; three decimal places do not establish its positional accuracy.

The catalogue explicitly marks both points as manually authored synthetic numbers. Their uncertainty is unknown. A real source would require its identity, acquisition method and available quality information. An arbitrary point should not automatically be called the “town centre”: it might represent a label position, an administrative centre or another provider convention.

At step 30, P1 receives corrected coordinates: latitude 12.341 and longitude 45.672. Its internal ID remains P1, while the coordinate record receives a new revision. The previous value stays in history. If these coordinates were used for a weather request, the product must separately decide which retrieved data still corresponds to the revised request; an unchanged ID is insufficient.

A third invented place, P3, has unknown coordinates. It can have a name and a local identity while its coordinates remain null. Substituting (0, 0) would invent a specific point instead of representing absence. A weather feature needs to explain that it cannot determine the request location for this selection.

Administrative change needs a continuity decision

At step 20, P1 moves from the northern region to the river region of the same fictional country. The scenario explicitly retains the place's identity. Administrative history stores both relationships with defined validity boundaries. The starting boundary is inclusive and the ending boundary exclusive, so the new record applies at step 20 itself.

Logical steps explain sequence only. They are not dates of an actual administrative decision. A real catalogue should distinguish when a change took effect from when the system received it. A late message should not silently rewrite the meaning of a historical query without a defined policy.

A rename or parent-region change does not supply a universal answer for mergers or splits. When one settlement divides into several, the catalogue must establish which new records correspond to existing relationships. In our example, a proposed split at step 40 remains unresolved: successors have not been specified, and saved references do not move automatically.

The decision's source matters here. Similar names, nearby coordinates or identical region names do not prove continuity of the same place. Until an accepted mapping exists, retaining a clarification state is more honest than accidentally directing a reader to another settlement.

An external ID has a namespace

Two invented providers can both use the external value 17. In our table, provider-a / 17 maps to P1, while provider-b / 17 maps to P2. Looking up the number 17 alone is ambiguous. The external-reference key therefore includes its source, while local identity remains separate.

Changing providers must not merge these relationships without evidence. An accepted mapping, its provenance and behavior for an unknown record are needed. Even an exact name match and nearby coordinates may only justify further examination. A geographic catalogue must also avoid silently equating a town ID with a station or forecast-cell ID: they identify different observation or calculation objects.

Real data acquisition requires a separate review of the source's terms. For example, GeoNames describes usage and attribution conditions. No GeoNames data was imported for this article; its documentation provides a public explanation of catalogue structure.

Read the scenario before writing an importer

The accompanying JSON contains three places, twelve localized name records and ten authored acceptance rows, not ten runtime cases. They cover identical names, language changes, explicit selection, renaming, historical matching, administrative change, coordinate correction, unknown coordinates, external namespaces and an unresolved split.

The matrix specifies expected decisions. In an independent rerun on Python 3.12.3, the native structural checker performed 11 checks and recorded no resolver, geocoder, provider or human observations. It is not an executed search service, a study of human behavior or a geographic-accuracy assessment. For discussing the model, it lets us follow which reference stays stable, which attribute changes and where grounds for an automatic transition are missing.

Implementation should begin with these boundaries: retain the selected place by ID, expose ambiguity as a separate outcome, preserve name and coordinate history, and require a source for mappings. A reader can then recognize a saved choice after an ordinary rename, while a complicated catalogue change remains visible instead of hiding behind a plausible weather card.

  1. Editorial Stable content identity: Content ID, slug, revision and DB ID
  2. Weather A city between grid nodes: choosing a forecast point
  3. Weather 77 thousand cities: how many distinct forecast points need processing
  4. Weather Finding a place: names, transliteration and a clear choice