[openstreetmap/openstreetmap-website] Add a gpx_tracks table and convert trace points into linestrings (PR #7348)

Ruben L. Mendoza notifications at github.com
Thu Sep 3 09:56:38 UTC 2026


@Rub21 commented on this pull request.



> +  def test_coordinates_are_saved_in_degrees
+    trace = create(:trace)
+    timestamp = Time.utc(2026, 1, 1)
+    create(:tracepoint, :trace => trace, :latitude => 123_456_789, :longitude => -770_123_456,
+                        :altitude => 100.5, :timestamp => timestamp)
+    create(:tracepoint, :trace => trace, :latitude => 123_456_790, :longitude => -770_123_455,
+                        :altitude => 101.5, :timestamp => timestamp + 1)
+
+    TraceLinestringJob.perform_now(trace)
+
+    lon, lat, altitude, time = first_point(trace)
+
+    assert_in_delta(-77.0123456, lon, 0.0000001)
+    assert_in_delta(12.3456789, lat, 0.0000001)
+    assert_in_delta(100.5, altitude, 0.001)
+    assert_in_delta(timestamp.to_i, time, 0.001)

Good points, fixed!!

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7348#discussion_r3923313732
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/7348/review/5100454894 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260903/d7570b3d/attachment.htm>


More information about the rails-dev mailing list