feat: 1.增加道路任务1秒2拍功能,修改为快照模式 2.增加自动采集道路任务功能
This commit is contained in:
@@ -1,9 +1,16 @@
|
||||
package com.navinfo.outdoor;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.locationtech.jts.geom.LineString;
|
||||
import org.locationtech.jts.geom.Point;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import com.tencent.tencentmap.mapsdk.maps.model.LatLng;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
@@ -14,4 +21,15 @@ public class ExampleUnitTest {
|
||||
public void addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2);
|
||||
}
|
||||
@Test
|
||||
public void testDistance() {
|
||||
Point point = (Point) GeometryTools.createGeometry(new LatLng(4,4));
|
||||
List<LatLng> latLngList = new ArrayList<>();
|
||||
latLngList.add(new LatLng(0,0));
|
||||
latLngList.add(new LatLng(1,1));
|
||||
|
||||
LineString lineString = GeometryTools.getLineStainGeo(latLngList);
|
||||
|
||||
System.out.println("距离:"+lineString.distance(point));
|
||||
}
|
||||
}
|
||||
1229
app/src/test/java/com/navinfo/outdoor/GeometryTools.java
Normal file
1229
app/src/test/java/com/navinfo/outdoor/GeometryTools.java
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user