# ulice-najblizsie: the nearest places of each kind on foot, from each street

For each of the 148 streets of Senec, the nearest 3 places of each kind people ask „najbližší …“ for, by
walking time, as FOSSGIS's OSRM router estimates it on OpenStreetMap data: 10304 street, kind and place triples over
21 kinds, from 298 places of the `mapa` dataset. A place with `also_categories` counts in each of its kinds.

The kinds are `mapa` categories (decided 8 Nov 2026):

- the map's starting view „Dôležité lokality“, read from `data/taxonomy.json`: `klientske-centrum`, `mestsky-urad`, `statne-urady`, `mestska-policia`, `zberne-dvory`, `notari`, `posta`, `balikoboxy`, `banky`, `bankomaty`, `lekari-dospeli`, `lekari-deti`, `lekarne`, `pohotovost`, `stanica`;
- and beside it: `potraviny`, `zastavky`, `ihriska`, `zubari`, `skolky`, `skoly`.

- Origins: each street walks from its medoid address point in Register adries, the one with the least summed distance
  to the street's other points. A street with address points more than 350 m from it gets up to 4 more
  origins, so a long street's parts each have their own lists: 184 origins, 21 streets with more than one.
  They are in `ulice-najblizsie-body`, with the house numbers each one serves.
- Places: `data/mapa.json`; each place's own source is in that dataset.
- Router: FOSSGIS's OSRM on OpenStreetMap data, the foot profile (https://routing.openstreetmap.de/about.html), the router openstreetmap.org's
  route planner offers as „OSRM (FOSSGIS)“. Routed on 2026-11-08 to 2026-11-25 by `scripts/fetch_ulice_trasy.py`, monthly; built
  by `scripts/build_ulice_najblizsie.py`.

The times are an estimate: the router knows the paths OpenStreetMap has, at a steady walking pace, and nothing of
their state (mud, a locked gate, works, a crossing without lights). A path missing from OpenStreetMap makes a walk
longer than it is; fix the map at https://www.openstreetmap.org/fixthemap. The time and distance run between the
points where the router joins the path network, near the origin and near the place; `snap_m` says how far the place's
point lies from its join. A place the router had to move more than 200 m is left out (0 now), and so is a pair
without a route. `walk_m` can be several times `straight_m` where a railway, the lakes or a fence lie between:
146 of the nearest places are more than 3 times their straight line. The lists are ordered by walking
time and say nothing of the places themselves.

The same walk on openstreetmap.org, with the same router, is
`https://www.openstreetmap.org/directions?engine=fossgis_osrm_foot&route=<lat>%2C<lon>%3B<lat>%2C<lon>`, the origin's
`lat` and `lon` from `ulice-najblizsie-body` first, then the place's from `mapa`, each to 6 decimals. The dataset
doesn't store it.

The walking times derive from OpenStreetMap data: © OpenStreetMap contributors, ODbL 1.0
(https://www.openstreetmap.org/copyright), routed by FOSSGIS e.V. (https://routing.openstreetmap.de).

## Fields

The JSON is one line, a record per street.

| Field | Type | Meaning |
| --- | --- | --- |
| `street_id`, `slug`, `name` | string | The street, as in `ulice`. |
| `origins` | list | The street's origins, the medoid first: `origin_id` (the address point's Register adries `identifier`, a record of `ulice-najblizsie-body`), `main` (true for the medoid of the whole street) and `address_points_served`, how many of the street's address points lie nearer to it than to the street's other origins. |
| `nearest` | list | Per origin and kind (in the order listed above), the nearest 3 places: `origin_id`, `category` (the `mapa` category), `rank` (1 to 3, by walking time, then distance, then `record_id`), `record_id` (the place in `mapa`), `walk_s` (walking time in seconds), `walk_m` (walking distance in metres), `straight_m` (the straight line from the origin to the place, in metres) and `snap_m` (how far the router moved the place's point to reach a path, in metres). A kind with fewer than 3 places that can be reached has fewer. |
| `retrieved_at` | date | The day the router was asked, the oldest among the street's origins. |
| `source_url` | string | The router, the source of the times. |
| `last_update` | date | The day this street's lists last changed. |

The CSV has one row per street, origin, kind and place, with the street's `retrieved_at`, `source_url` and
`last_update`.

## License

Published by Som Senec under the Open Database License 1.0 (ODbL 1.0): https://opendatacommons.org/licenses/odbl/1-0/. It contains data from OpenStreetMap, © OpenStreetMap contributors, which the ODbL requires to stay under the ODbL. Credit "© OpenStreetMap contributors" and "Som Senec, somsenec.sk", and publish an adapted version under the ODbL. The source documents that each record links to keep their own terms.
