Add a limit on the number of points in a GPS trace

This commit is contained in:
Tom Hughes 2024-02-24 14:34:09 +00:00
parent 4c029873bb
commit 741ed58838
4 changed files with 24 additions and 2 deletions

View file

@ -202,7 +202,7 @@ class Trace < ApplicationRecord
logger.info("GPX Import importing #{name} (#{id}) from #{user.email}")
file.open do |file|
gpx = GPX::File.new(file.path)
gpx = GPX::File.new(file.path, :maximum_points => Settings.max_trace_size)
f_lat = 0
f_lon = 0