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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
| package cn.flightfeather.supervision.business.location
|
| import cn.flightfeather.supervision.domain.ds1.mapper.ScenseMapper
| import org.junit.Test
| import org.junit.jupiter.api.Assertions.*
| import org.junit.jupiter.api.extension.ExtendWith
| import org.junit.runner.RunWith
| import org.springframework.beans.factory.annotation.Autowired
| import org.springframework.boot.test.context.SpringBootTest
| import org.springframework.test.context.junit.jupiter.SpringExtension
| import org.springframework.test.context.junit4.SpringRunner
|
| @RunWith(SpringRunner::class)
| @ExtendWith(SpringExtension::class)
| @SpringBootTest
| class LocationRoadNearbyTest {
|
| @Autowired
| lateinit var scenseMapper: ScenseMapper
|
| @Test
| fun foo1() {
| val locationRoadNearby = LocationRoadNearby(scenseMapper)
| // val b = LocationRoadNearby.BasePlace("", Pair(121.378346, 30.84923), Pair(121.378296, 30.861472))
| // locationRoadNearby.search(b, 1000.0)
| val bList = listOf(
| // LocationRoadNearby.BasePlace("干钱路-金石北路-金张公路", Pair(121.218411,30.826654), Pair(121.227142,30.828403)),
| // LocationRoadNearby.BasePlace("金廊公路-建乐路-朱吕公路", Pair(121.18409,30.835699), Pair(121.183811,30.831636)),
| // LocationRoadNearby.BasePlace("金张公路-田新路-干钱路", Pair(121.219555,30.829319), Pair(121.227142,30.828403)),
| // LocationRoadNearby.BasePlace("大茫中心路-朱平公路-朱增路", Pair(121.147448,30.858481), Pair(121.149312,30.857804)),
| // LocationRoadNearby.BasePlace("大茫中心路-建富路-朱平公路", Pair(121.141819,30.858344), Pair(121.147448,30.858481)),
| // LocationRoadNearby.BasePlace("朱吕公路-金张公路-康兴路", Pair(121.177261,30.83326), Pair(121.18053,30.830751)),
| // LocationRoadNearby.BasePlace("朱吕公路-金廊公路-康兴路", Pair(121.183811,30.831636), Pair(121.18053,30.830751)),
| // LocationRoadNearby.BasePlace("吕新路-建乐路-朱吕公路", Pair(121.191766,30.835612), Pair(121.196591,30.831604)),
| // LocationRoadNearby.BasePlace("溪北路-朱吕公路-新东街", Pair(121.171163,30.832014), Pair(121.174958,30.827349)),
| // LocationRoadNearby.BasePlace("东方红中心路-农建路-朱平公路", Pair(121.141617,30.870365), Pair(121.145145,30.870635)),
| // LocationRoadNearby.BasePlace("东方红中心路-朱平公路-朱增路", Pair(121.145145,30.870635), Pair(121.155051,30.870966)),
| // LocationRoadNearby.BasePlace("朱吕公路-金廊公路-田欢路", Pair(121.183811,30.831636), Pair(121.18989,30.831606)),
| // LocationRoadNearby.BasePlace("朱平公路-东富路-大茫中心路", Pair(121.146281,30.864199), Pair(121.147448,30.858481)),
| // LocationRoadNearby.BasePlace("朱平公路-东方红中心路-东富路", Pair(121.145404,30.869592), Pair(121.146281,30.864199)),
| // LocationRoadNearby.BasePlace("金张公路-金石北路-田新路", Pair(121.215668,30.830838), Pair(121.219555,30.829319)),
| // LocationRoadNearby.BasePlace("朱平公路-吕青路-蔷荚路", Pair(121.148479,30.836083), Pair(121.14842,30.842135)),
| // LocationRoadNearby.BasePlace("朱泾农建路-建富路-朱平公路", Pair(121.142609,30.863955), Pair(121.146407,30.864167)),
| // LocationRoadNearby.BasePlace("朱泾农建路-朱平公路-朱增路", Pair(121.146407,30.864167), Pair(121.153675,30.864075)),
| // LocationRoadNearby.BasePlace("吕青路-朱吕公路-朱平公路", Pair(121.136318,30.833325), Pair(121.148624,30.836094)),
| // LocationRoadNearby.BasePlace("泖湾支路-吕青路-朱平公路", Pair(121.155048,30.835229), Pair(121.148659,30.829861)),
|
| // LocationRoadNearby.BasePlace("徐汇上师大", Pair(121.419384,31.161433), Pair(121.419384,31.161433)),
| // LocationRoadNearby.BasePlace("静安监测站国控点", Pair(121.429439, 31.223632), Pair(121.429439, 31.223632)),
| // LocationRoadNearby.BasePlace("金山大道2000号", Pair(121.3404, 30.744262), Pair(121.3404, 30.744262)),
| LocationRoadNearby.BasePlace("仙霞站", Pair(121.394775, 31.203982), Pair(121.394775, 31.203982)),
|
| // LocationRoadNearby.BasePlace("程桥站", Pair(121.362928, 31.192925), Pair(121.362928, 31.192925)),
| // LocationRoadNearby.BasePlace("长阳站", Pair(121.424603, 31.223644), Pair(121.424603, 31.223644)),
|
|
| // LocationRoadNearby.BasePlace("古岗路", Pair(121.411559, 30.791152), Pair(121.423728, 30.788246)),
| // LocationRoadNearby.BasePlace("东方红中心路", Pair(121.141623, 30.870369), Pair(121.160251, 30.872135)),
| // LocationRoadNearby.BasePlace("漾平路", Pair(121.222056, 30.852923), Pair(121.237356, 30.853606)),
| // LocationRoadNearby.BasePlace("兴寒路", Pair(121.045916, 30.831142), Pair(121.052351, 30.836051)),
| // LocationRoadNearby.BasePlace("亭朱公路", Pair(121.328213, 30.874901), Pair(121.335347, 30.860441)),
| // LocationRoadNearby.BasePlace("卫八路", Pair(121.286369, 30.704997), Pair(121.279021, 30.722918)),
| // LocationRoadNearby.BasePlace("秋实路", Pair(121.273549, 30.720349), Pair(121.277212, 30.726353)),
| // LocationRoadNearby.BasePlace("恒康路", Pair(121.335671, 30.85661), Pair(121.342813, 30.857601)),
| // LocationRoadNearby.BasePlace("松溪路", Pair(121.236017, 30.894031), Pair(121.24154, 30.892297)),
| // LocationRoadNearby.BasePlace("兴桂路", Pair(121.105814, 30.876818), Pair(121.106139, 30.868925)),
| // LocationRoadNearby.BasePlace("荣丰路", Pair(121.236894, 30.83599), Pair(121.253117, 30.835875)),
| // LocationRoadNearby.BasePlace("叶新公路", Pair(121.164193, 30.936096), Pair(121.023036, 30.933981)),
| // LocationRoadNearby.BasePlace("阳康路", Pair(121.355063, 30.780308), Pair(121.35446, 30.774935)),
| // LocationRoadNearby.BasePlace("张旧支路", Pair(121.321495, 30.783227), Pair(121.325356, 30.785677)),
| // LocationRoadNearby.BasePlace("农建路", Pair(121.134021, 30.855966), Pair(121.141504, 30.856559)),
| // LocationRoadNearby.BasePlace("合展路", Pair(121.407831, 30.801774), Pair(121.426746, 30.797785)),
| // LocationRoadNearby.BasePlace("天华路", Pair(121.451848, 30.776257), Pair(121.4337, 30.80644)),
| // LocationRoadNearby.BasePlace("珠港街", Pair(121.337652, 30.847802), Pair(121.345829, 30.846835)),
| // LocationRoadNearby.BasePlace("荣东路", Pair(121.249271, 30.832921), Pair(121.249176, 30.835928)),
| // LocationRoadNearby.BasePlace("九丰路", Pair(121.254114, 30.903438), Pair(121.254715, 30.893363)),
| )
| listOf(
| 500.0,
| // 1000.0,
| 2000.0,
| 3000.0
| ).forEach {
| locationRoadNearby.searchList(bList, it)
| }
| }
| }
|
|