Skip to content
Snippets Groups Projects
Commit 6de8f64a authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Create function `get_extr_coord`

parent 2b80a7e8
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ import report_graph
import numpy as np
import random
def plot_single_traj(traj, e_overestim, SHPC, ax, src_crs, annotate_flag):
def get_extr_coord(traj, e_overestim, SHPC):
xy = []
for node in traj:
......@@ -15,7 +15,10 @@ def plot_single_traj(traj, e_overestim, SHPC, ax, src_crs, annotate_flag):
shape = SHPC.get_reader(i_slice, layer = "extremum").shape(ishape)
xy.append(shape.points[0])
xy = np.array(xy)
return np.array(xy)
def plot_single_traj(traj, e_overestim, SHPC, ax, src_crs, annotate_flag):
xy = get_extr_coord(traj, e_overestim, SHPC)
ax.plot(xy[:, 0], xy[:, 1], color = "red", transform = src_crs)
ax.plot(xy[0, 0], xy[0, 1], marker = "s", color = "black",
transform = src_crs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment