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
| 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.419384,31.161433)),
| )
| listOf(500.0, 1000.0, 2000.0, 3000.0).forEach {
| locationRoadNearby.searchList(bList, it)
| }
| }
| }
|
|