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

Polish

parent 7930dca7
No related branches found
No related tags found
No related merge requests found
......@@ -19,9 +19,9 @@ def compute_ishape(n, k1, ishape_last):
else:
return ishape
def get_coord(n, k1, ishape_last, sr):
def get_coord(n, k1, ishape_last, s_read):
ishape = compute_ishape(n, k1, ishape_last)
return sr.shape(ishape).points[0]
return s_read.shape(ishape).points[0]
if __name__ == "__main__":
import itertools
......@@ -39,9 +39,9 @@ if __name__ == "__main__":
dtype = int)
pos = {}
with shapefile.Reader(path.join(shp_tr_dir, "extremum")) as sr:
k1 = sr.record(0)["date_index"]
for n in G: pos[n] = get_coord(n, k1, ishape_last, sr)
with shapefile.Reader(path.join(shp_tr_dir, "extremum")) as s_read:
k1 = s_read.record(0)["date_index"]
for n in G: pos[n] = get_coord(n, k1, ishape_last, s_read)
color_iter = itertools.cycle(('#1f77b4', '#aec7e8', '#ff7f0e', '#ffbb78',
'#2ca02c', '#98df8a', '#d62728', '#ff9896',
......
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