Skip to content
Snippets Groups Projects
Commit 6bcb6ef5 authored by Raphael Sturgis's avatar Raphael Sturgis
Browse files

refactor

parent d4570c3b
No related branches found
No related tags found
2 merge requests!22Resolve "Add link interpolation",!13Draft: Develop
......@@ -165,8 +165,8 @@ def generate_links(data, positions, height, width, lower_lat, upper_lat, lower_l
upper_lon)
lon, lat = longitude, latitude
for x, y in bresenham(x_prv, y_prev, x_nxt, y_nxt):
for i, v in enumerate(current_value):
data[x, y, i] = v
for i in range(len(current_value)):
data[x, y, i] = current_value[i]
current_value = nxt_value
......@@ -374,6 +374,7 @@ class AISTrajectory(AISPoints):
if features_vectors is not None:
nb_channels = len(features_vectors.T)
bounds = np.array(bounds)
else:
nb_channels = 1
data = np.zeros((height, width, nb_channels), dtype=np.float)
......@@ -384,10 +385,9 @@ class AISTrajectory(AISPoints):
if link:
generate_links(data, positions, height, width, lower_lat, upper_lat, lower_lon, upper_lon,
np.ones(len(positions)))
np.ones((len(positions), 1)))
else:
print(features_vectors[0] / 10)
generate_points_with_features(data, positions, features_vectors, np.array(bounds), node_size, height, width,
lower_lat, upper_lat, lower_lon, upper_lon, )
if link:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment