gpx_doctor 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/gpx_doctor/point_labeler.rb +3 -1
- data/lib/gpx_doctor/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 62f11c008dcbf53c4585d1cc1d4935555ddecbfc98ce4db4f0141476f2847ce3
|
|
4
|
+
data.tar.gz: ebf37bed3a22db9e84a6a0d1b593f2e3f9e9bf0146f114a06d8b900cc2e853f8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b096d0f32832c3ecd0147bd5b6066dd18f1fd19233af68101d486b5a4895febb2228da30fd907b849436a1feaca98bc707cfd2a0963b05b0587962d11a803f85
|
|
7
|
+
data.tar.gz: 5cf20d498a2247483904a86ca637bff0cc527bafe74f7c312d869694ef05fa798f675940f536980240eab12a90034bed42e841bcc6056bf43fb5505484baddc8
|
data/README.md
CHANGED
|
@@ -298,7 +298,7 @@ GpxDoctor::Builder.build_file(result, 'output.gpx')
|
|
|
298
298
|
| `distance_to_next` | Float | Distance to next point (metres or feet based on `unit_system`) — set by `segment_statistics: true` |
|
|
299
299
|
| `elevation_change` | Float | Elevation change to next point (metres or feet based on `unit_system`) — set by `segment_statistics: true` |
|
|
300
300
|
| `direction` | Float | Bearing to next point (0–360°) — set by `segment_statistics: true` |
|
|
301
|
-
| `cumulative_distance` | Float | Cumulative distance from segment/route start (kilometres or miles based on `unit_system`) — set by `cumulative_distance: true` |
|
|
301
|
+
| `cumulative_distance` | Float | Cumulative distance from segment/route start (kilometres or miles based on `unit_system`) — set by `cumulative_distance: true`; also set (to the same value as `label`) for points inserted by `label_interval` |
|
|
302
302
|
| `label` | Float | Cumulative distance mark for a point inserted by `label_interval` (kilometres or miles based on `unit_system`); `nil` for points not created for labelling — set by `label_interval` |
|
|
303
303
|
|
|
304
304
|
`Waypoint#to_h` returns a hash of all non-nil fields.
|
|
@@ -34,6 +34,7 @@ module GpxDoctor
|
|
|
34
34
|
cumulative = cumulative_distances(points)
|
|
35
35
|
|
|
36
36
|
result = [points.first]
|
|
37
|
+
label_interval = label_interval.to_f
|
|
37
38
|
target = label_interval
|
|
38
39
|
|
|
39
40
|
points.each_cons(2).with_index do |(a, b), i|
|
|
@@ -87,7 +88,8 @@ module GpxDoctor
|
|
|
87
88
|
lon: a.lon + fraction * (b.lon - a.lon),
|
|
88
89
|
ele: ele,
|
|
89
90
|
time: time,
|
|
90
|
-
label: target
|
|
91
|
+
label: target,
|
|
92
|
+
cumulative_distance: target
|
|
91
93
|
)
|
|
92
94
|
end
|
|
93
95
|
end
|
data/lib/gpx_doctor/version.rb
CHANGED