-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdrawpolygon.py
34 lines (27 loc) · 2.17 KB
/
drawpolygon.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import pandas as pd
import matplotlib.pyplot as plt
from shapely.geometry import Point, Polygon
def get(track_id):
p1 = [[1007.39096375438, 978.556117112039], [1007.459, 983.274], [1008.88629254961, 988.367133245618], [994.009200772736, 986.155581386268], [995.533, 981.156], [997.744470414298, 975.7908134258452], [1007.39096375438, 978.556117112039]]
p2 = [[1007.39096375438, 978.556117112039], [1007.364, 983.328], [1008.88629254961, 988.367133245618], [994.009200772736, 986.155581386268], [995.786, 980.866], [997.744470414298, 975.7908134258452], [1007.39096375438, 978.556117112039]]
p3 = [[974.830034308892, 1010.64051345868], [978.589, 1006.587], [983.620963189053, 1000.65617188134], [986.042701284692, 1016.32381935649], [981.699, 1018.227], [976.650809574989, 1019.95130330364], [974.830034308892, 1010.64051345868]]
p5 = [[1011.33966689685, 991.100871514259], [1016.991, 992.656], [1021.55298065377, 992.960398802832], [1026.24411307275, 1002.63976209999], [1019.783, 1004.162], [1012.15051538235, 1010.12692232512], [1011.33966689685, 991.100871514259]]
p6 = [[1014.03050125303, 1007.84220902567], [1019.162, 1005.464], [1024.10993286944, 1002.63976209999], [1024.89810645068, 992.529285670486], [1019.651, 992.599], [1014.1655576562, 992.60904553715], [1014.03050125303, 1007.84220902567]]
p7 = [[1010.45117163635, 990.381797715557], [1015.635, 993.756], [1021.96549134777, 993.096648172934], [1024.10993286944, 1002.63976209999], [1019.215, 1005.242], [1014.03050125303, 1007.84220902567], [1010.45117163635, 990.381797715557]]
p8 = [[997.332990100258, 977.062773605065],[995.568, 981.731], [994.009200772736, 986.442784832593], [1008.08631507395, 986.726519255733], [1006.717, 981.876], [1007.03780705121, 977.554465263508], [997.332990100258, 977.062773605065]]
if track_id == 'P1':
return p1
elif track_id == 'P2':
return p2
elif track_id == 'P3':
return p3
elif track_id == 'P4':
return 0
elif track_id == 'P5':
return p5
elif track_id == 'P6':
return p6
elif track_id == 'P7':
return p7
elif track_id == 'P8':
return p8