Skip to content

Read locations written in other systems in the app - #65

Merged
octopranav merged 1 commit into
mainfrom
android-other-formats
Sep 24, 2026
Merged

octopranav merged 1 commit into
mainfrom
android-other-formats

Conversation

@octopranav

Copy link
Copy Markdown
Owner

What

The search field, a link, or text selected in another app now takes a location written in another system, or a link from one of the common map services. The app converts it to a code, and the card says which system the place came from. The names of those systems appear only in the parser (core/Formats.kt), its tests and the app's strings, as the scoped exception allows. They appear nowhere else in the repository, this description included.

  • Codes of other systems are read by their owners' published rules. A short code written with its town is read against the town, found in the name index, or on the device when offline, preferring the region the text names. A short code with no town is read against the reader's own place, as a bare short form of this system is.
  • Map links give the pinned place when they carry one, even when a map view's centre appears earlier in the same link. A link that carries only a view's centre says so on the card.
  • Refused, not guessed. A system that only its owner's service can read, and a short link that says where it goes only when opened, are each named with what to do instead. The place stays where it was.

A converted code says how much its source said

A code names 2.5 m wherever it came from. When the source named an area larger than a cell, the card calls the code the centre of that area, not a door. Examples: a code for a square about 14 m across, or a link whose coordinates stop at two decimals and are good to about 1.1 km.

Ten characters that could be either

One system writes its codes as ten symbols with no separators, every one of which is also in this alphabet. So the same text is a code here and a place there. It opens as a code here, and the list under the field offers the other reading, one tap away. Written with that system's older separators, it can only be the other, and opens as that.

Checks

  • OtherFormatsTest (17 tests):
    • rows from the systems' own published decoding, recovery and validity tests, including recovery near the poles and 25 validity cases
    • the reference decoder's own answers for three places
    • map links of each service: pinned place versus view centre, and precision from decimals
    • what is refused, and this system's own text reading exactly as before
    • converted places remembering their source until a nudge
    • picking a town by region
  • Breaking two rules on purpose fails the right tests: letting ten bare characters become the other system's code, and preferring a map view's centre over the pinned place.
  • 115 core tests pass.
  • On the emulator:
    • a full code, and its short form written with its town, landed on the same place
    • the separated form opened with its size noted ("about 4 m across")
    • typing ten bare characters offered the other reading, and choosing it went there
    • shared map links gave the pinned place, the view-centre note and the 1.1 km note, as each should
    • the two refusals showed their messages without moving the place

The search field, links and text selected in another app now take a
location written in several other systems and in the links common map
services share. Each is read by its owner's published rules and tested
against the owner's published answers, and the card says which system the
place came from. A short code of another system written with its town is
read against the town, found in the name index or on the device.

A converted code says how much its source said: when the source named an
area larger than a cell, or a link's coordinates stop at a few decimals, the
card calls the code the centre of that area, not a door, and a link that
carries only the middle of a map view says so. Ten characters that are a
code here and in another system too open as a code here, with the other
reading offered one tap away. What only its owner's service can read, and a
short link that says where it goes only when opened, are named and refused
rather than guessed.

The names of other systems live only in the parser, its tests and the
app's strings.
@octopranav
octopranav merged commit 982001e into main Sep 24, 2026
21 checks passed
@octopranav
octopranav deleted the android-other-formats branch September 24, 2026 13:18
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