# allgpslogstil2005

An interactive map of a GPSMan GPX export from a Garmin handheld (2004–2005):
a saved track without timestamps, a dated active log, and named waypoints.

## Put it online

Upload the whole `allgpslogstil2005/` folder to your web server, for example
to `https://your-site/gps/`. Every path is relative, so it works in any
subfolder. There is no build step and nothing to install on the server.

The page makes no requests to other sites: Leaflet, the fonts and the basemap
are all in this folder. The only outbound links are the "Open in OpenStreetMap"
links, which open only when clicked.

`tools/` is not needed on the server and can be left out of the upload.

To preview locally, open `index.html` directly in a browser.

## Layout

    index.html
    assets/site.css         page styles, light and dark themes
    assets/site.js          map, timeline strip, selection logic
    assets/leaflet/         Leaflet 1.9.4
    assets/fonts/           Barlow, Barlow Condensed, Handjet (woff2, Latin subsets)
    data/tracks.js          cleaned log segments, saved track, waypoints
    data/basemap.js         Natural Earth land, lakes, rivers, roads, borders, labels
    tools/                  scripts that produced data/ and index.html

## Links to a selection

The address updates as you select things, so you can link straight to them:

    index.html#d=2005-05-08   one day of the log
    index.html#c=L5           a chapter of the log (L1 to L11)
    index.html#s=S12          a chapter of the saved track (S1 to S14)

## Rebuilding

Requires Python 3 and `shapely` (`pip install shapely`).

    cd tools
    python3 01_tracks.py path/to/allgpslogstil2005 tracks.json
    # Natural Earth layers, into tools/ne/
    mkdir -p ne && for f in ne_110m_land ne_50m_land ne_10m_land ne_10m_lakes ne_10m_lakes_europe \
      ne_10m_rivers_lake_centerlines ne_10m_rivers_europe ne_10m_admin_0_boundary_lines_land \
      ne_50m_admin_0_boundary_lines_land ne_10m_populated_places_simple ne_10m_roads; do
      curl -L -o ne/$f.geojson https://raw.githubusercontent.com/nvkelso/natural-earth-vector/master/geojson/$f.geojson; done
    python3 02_basemap.py ne base.json
    python3 03_build.py

Chapter titles, glitch filtering and local-time rules live in `01_tracks.py`.
Extra place labels and label spelling fixes live at the end of `02_basemap.py`.
Page markup, styles and scripts live in `tools/template.html`; `03_build.py`
splits it into `index.html`, `assets/site.css` and `assets/site.js`.

## Credits and licences

- Leaflet, BSD 2-Clause, see `assets/leaflet/LICENSE.txt`
- Barlow and Barlow Condensed (Jeremy Tribby) and Handjet (Rosetta), SIL Open Font License 1.1, see `assets/fonts/`
- Basemap data from Natural Earth, public domain
