Skip to content

drmats/otrails

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Otrails

Otrails logo

Trails. Open.

Parse garmin data export files, download images, parse IGC file sets, store geometries in PostGIS, compute occupied MVT tile coordinates, bake MVT tiles into MBTile format, serve multiple MBTile data sources, visualise with MapLibre and more.

Hiking trails, cycling routes, running paths, flight tracks, multiple users - all at once.


hikes-and-walks


documentation


quickstart

  1. Export your data from garmin.

  2. Put downloaded zip file into data/exports folder in this repository.

  3. Add three new vars and build cli:

    yarn vars set exportsDir data/exports
    yarn vars set extractsDir data/garmin
    yarn vars set tilesDir data/tiles
    yarn build:cli
    
  4. Ingest and process exported garmin data - invoke the following cli command:

    cli ingest-garmin-data [zipFileName] [userShortId]
    

    ([zipFileName] is the name of file downloaded from garmin, and [userShortId] can be your name or nick, e.g. bob)

  5. Ingest and process IGC flights (optional):

    • add new entry to vars:
      yarn vars set flightsDir data/flights
      
    • copy your IGC files into data/flights subfolder (e.g. data/flights/solo)
    • ingest and process igc file set:
      cli process-igcs solo [userShortId]
      
  6. "Bake" usable data set:

    cli setup-views
    cli bake-tiles
    
  7. Initialize base maps layers:

    cli prepare-base-maps
    cli init-proxy-tiles open-street-map.raster "https://tile.openstreetmap.org/{z}/{x}/{y}.png"
    
  8. Add another three vars, build and run service:

    yarn vars set serviceDbDir data/service
    yarn vars set servicePort 7777
    yarn vars set staticDir data/static
    yarn build:service
    yarn start:service
    
  9. Open new terminal console, build and run web:

    yarn build:web
    yarn start:web
    
  10. Open http://localhost:8000/ in your web browser.


tinkering in pgadmin

Install and open pgAdmin, connect it to otrails-postgis database, open Query Tool, run hikesAndWalks.sql example query and open Geometry Viewer.

About

Trails. Open.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published