33from typing import Callable
44
55from PIL import Image , ImageDraw , ImageFont
6- from geocompy .data import Coordinate , Angle , Vector
6+ from geocompy .data import Coordinate , Angle
77
88
99def read_points (
@@ -34,8 +34,8 @@ def read_points(
3434
3535def read_metadata (
3636 path : Path
37- ) -> dict [str , tuple [Angle , Angle , Coordinate , Vector ]]:
38- pictures : dict [str , tuple [Angle , Angle , Coordinate , Vector ]] = {}
37+ ) -> dict [str , tuple [Angle , Angle , Coordinate , Coordinate ]]:
38+ pictures : dict [str , tuple [Angle , Angle , Coordinate , Coordinate ]] = {}
3939 with path .open ("rt" , encoding = "utf8" ) as file :
4040 next (file )
4141 for line in file :
@@ -59,7 +59,7 @@ def read_metadata(
5959 float (pos_y ),
6060 float (pos_z )
6161 ),
62- Vector (
62+ Coordinate (
6363 float (dir_x ),
6464 float (dir_y ),
6565 float (dir_z )
@@ -123,7 +123,7 @@ def draw_marker_cross(
123123
124124def annotate_image (
125125 imgpath : Path ,
126- info : tuple [Angle , Angle , Coordinate , Vector ],
126+ info : tuple [Angle , Angle , Coordinate , Coordinate ],
127127 points : list [tuple [str , Coordinate ]],
128128 markerdrawer : Callable [[ImageDraw .ImageDraw , float , float , str ], None ]
129129) -> None :
@@ -135,7 +135,7 @@ def annotate_image(
135135 half_fov_hz = fov_hz / 2
136136 half_fov_v = fov_v / 2
137137
138- img_hz , img_v , _ = (Coordinate . from_vector ( vec ) - pos ).to_polar ()
138+ img_hz , img_v , _ = (vec - pos ).to_polar ()
139139
140140 for pt , coord in points :
141141 pt_hz , pt_v , _ = (coord - pos ).to_polar ()
@@ -157,7 +157,7 @@ def annotate_image(
157157
158158
159159def run_annotate (
160- meta : dict [str , tuple [Angle , Angle , Coordinate , Vector ]],
160+ meta : dict [str , tuple [Angle , Angle , Coordinate , Coordinate ]],
161161 images : tuple [Path ],
162162 points : list [tuple [str , Coordinate ]],
163163 rgb : tuple [int , int , int ] = (0 , 0 , 0 ),
0 commit comments