Skip to content

Commit f73e1d3

Browse files
authored
fix: missing make/model when geotagging with gpx (#705)
1 parent b0f19c9 commit f73e1d3

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

mapillary_tools/video_data_extraction/extractors/gopro_parser.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ def extract_points(self) -> T.Sequence[geo.Point]:
2626
return []
2727

2828
def extract_make(self) -> T.Optional[str]:
29+
model = self.extract_model()
30+
if model:
31+
return "GoPro"
32+
33+
# make sure self.pointsFound is updated
34+
_ = self.extract_points()
2935
# If no points were found, assume this is not a GoPro
3036
return "GoPro" if self.pointsFound else None
3137

mapillary_tools/video_data_extraction/extractors/gpx_parser.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from ... import geo
44
from ...geotag import geotag_images_from_gpx_file
55
from .base_parser import BaseParser
6+
from .generic_video_parser import GenericVideoParser
67

78

89
class GpxParser(BaseParser):
@@ -23,7 +24,9 @@ def extract_points(self) -> T.Sequence[geo.Point]:
2324
return points
2425

2526
def extract_make(self) -> T.Optional[str]:
26-
return None
27+
parser = GenericVideoParser(self.videoPath, self.options, self.parserOptions)
28+
return parser.extract_make()
2729

2830
def extract_model(self) -> T.Optional[str]:
29-
return None
31+
parser = GenericVideoParser(self.videoPath, self.options, self.parserOptions)
32+
return parser.extract_model()

0 commit comments

Comments
 (0)