Skip to content
Snippets Groups Projects

Resolve "Image creation bugs with 0 size windows"

Closed Raphael Sturgis requested to merge 21-image-creation-bugs-with-0-size-windows into main
1 file
+ 7
0
Compare changes
  • Side-by-side
  • Inline
@@ -236,6 +236,13 @@ class AISTrajectory(AISPoints):
positions = self.df[['longitude', 'latitude']].to_numpy()
min_lon, max_lon = (min(positions[:, 0]), max(positions[:, 0]))
min_lat, max_lat = (min(positions[:, 1]), max(positions[:, 1]))
if min_lat == max_lat:
min_lat -= 1
max_lat += 1
if min_lon == max_lon:
min_lon -= 1
max_lon += 1
for longitude, latitude in positions:
x_coord, y_coord = get_coord(latitude, longitude, height, width, min_lat, max_lat, min_lon, max_lon)
Loading