Bicycle and foot route profiles (Valhalla bicycle/pedestrian costing); hiking trail colours in the elevation profile; power, splits and best efforts in the profile; TCX import; FIT course export
CI / check (push) Successful in 19s
CI / deploy (push) Successful in 18s

This commit is contained in:
randy committed 2026-11-16 12:18:06 +01:00
1 parent 4c704045c5
commit f8755ea65a
21 files changed
+634 -40

No files matched your search

+4 -1
View File
@@ -6,6 +6,8 @@ require "sqlite3"
require "time"
require_relative "gpx"
require_relative "fit"
require_relative "tcx"
require_relative "fit_course"
require_relative "gpx_store"
module Maptool
@@ -32,7 +34,7 @@ module Maptool
class InvalidValue < StandardError; end
ROOT = "root" # folder id in a node key for items with no folder
EXTENSIONS = %w[.gpx .fit .geojson].freeze
EXTENSIONS = %w[.gpx .fit .tcx .geojson].freeze
def initialize(db_path, gpx_store:, sources_dir:)
@path = db_path
@@ -511,6 +513,7 @@ module Maptool
def parse(path)
case File.extname(path).downcase
when ".fit" then Fit.to_geojson(path)["features"]
when ".tcx" then Tcx.to_geojson(path)["features"]
when ".geojson" then JSON.parse(File.read(path)).fetch("features", [])
else Gpx.to_geojson(path)["features"]
end