Live data & geography
Weather lookups, geocoding, distance (Haversine) and DMS/decimal degree syntax — with caching and privacy.
A few strict templates reach outside the Mac: weather in <place>,
location of <place>, latitude/longitude of <place>, and
distance between <end1> and <end2>. Each one is a strict pattern — if the
line does not match exactly, nothing is sent anywhere.
This page documents the weather parser and its 600-second cache, the R85 geography templates (named places and explicit coordinates), the Haversine distance semantics, the DMS/decimal degree lane, and the privacy rules that apply to every request. Results driven by external data are marked as dynamic throughout.
Weather
The exact template is (case-insensitive):
weather in <place>
<place> is free text up to 100 characters. Safe punctuation is allowed so
ambiguous names can be written naturally — New York, Paris, France,
St. Louis, Côte d'Ivoire.
These make the line not a weather request (it continues down the normal pipeline):
- an empty place value,
- control characters,
- answer-token markers,
#,=,- operators:
+ - * / × ÷ − ^ % ( ).
The result is the current temperature in °C (C°) — a dynamic value.
- Provider: Open-Meteo, no key.
- Cache: last-good result per canonical request, 600-second TTL, then a background refresh.
- Offline: the last cached value; with no cache at all,
Weather unavailable. - Privacy: only the place name is sent.
Geography (R85)
The exact templates are (case-insensitive):
location of <place>
latitude of <place>
longitude of <place>
distance between <end1> and <end2>
The endpoints of distance between may each be either:
- a place name, resolved by the geocoder (dynamic), or
- explicit coordinates, which are resolved offline without any network request.
An unquoted name is split on the last standalone and in the line.
Quotes are therefore supported — and recommended — for names that contain
and:
distance between "Rock and Roll Hall" and Vienna
A single or unbalanced quote takes the line out of the geo grammar entirely.
Coordinate endpoints are written <latitude>, <longitude>. In a dot-decimal
locale the separator is a comma; in a decimal-comma locale the pair uses a
dot and is separated by a semicolon (;). Valid ranges: latitude −90…90,
longitude −180…180.
Distance semantics
distance between computes a Haversine surface distance — the direct
great-circle distance, not a driving or flight route.
- Earth radius: the mean WGS84 radius, 6,371,008.8 m.
- The result is clamped to the physical range [0, half the circumference].
- Distances of 1000 m and above display in kilometres.
Geocoding details:
- Provider: Open-Meteo, using only the geocoding endpoint; the top-ranked result is used, and no forecast or key is requested.
- Cache:
locations.jsonwith a 30-day TTL. - Offline: the last cached resolution; otherwise
Location unavailable. - Privacy: only the place name is sent. The device’s GPS position is never used.
DMS / decimal degrees (R85)
The degree lane claims a line when any of the following holds:
- the line ends with
as DMSoras decimal; - it carries prime / double-prime components (DMS notation);
- a digit or sign sits immediately before
°(decimal degree form, including a trailing cardinal).
Temperature glyphs (C°, F°, K°, R°, always after a letter) are
temperatures and are never intercepted by this lane.
| Form | Example | Value |
|---|---|---|
| Decimal degree | 51.5074° | 51.5074 |
| + cardinal | 51.5° N, 0.1275° W | sign by N/S/E/W (S, W negative) |
| DMS | 156° 44′ 31.2″ | 156 + 44/60 + 31.2/3600 |
| Partial DMS | 156° 44′ | degrees + minutes, no seconds |
… as DMS | 51.25° as DMS | → 51° 15′ 0″ |
… as decimal | 156° 44′ 31.2″ as decimal | → 156.7419… |
Limits and rules:
- Minutes and seconds are 0…59.
- Seconds accept up to two decimal digits in input (
31.25″) and display with one (31.2″). - The glyphs are only
° ′ ″(U+00B0, U+2032, U+2033). ASCII'and''are not glyphs. - Glyph order is fixed — the first is only
°, the second only′, the third only″— and there are 2–3 components. - Digit chains without glyphs (
156 44 31) do not become DMS: the lane does not claim such a line. (With anas decimaltail it is intercepted by the integer lane instead.) Left ofas DMS/as decimal, a decimal number or a notation with at least one glyph is required. - A cardinal is accepted only with a pure decimal degree (
51.5° N); DMS notation with a cardinal (156°44′31″ W) is an error. - Display:
156° 44′ 31.2″(whole seconds without.0; in a decimal-comma locale31,2″; negatives with a leading−).
Dynamic results
Weather, geocoded locations and the distances that depend on them are driven by external data and change over time. Everything else on this page — coordinate-based distances and DMS conversion — is computed locally.
Related
- Privacy & network — the complete network model.
- Units & quantities — quantities and conversions that stay on the Mac.