spatial4j.jar计算2点经纬度之间的距离
<dependency>
<groupId>org.locationtech.spatial4j</groupId>
<artifactId>spatial4j</artifactId>
<version>0.8</version>
</dependency>
@Test
void f4(){
SpatialContext geo = SpatialContext.GEO;
Point point = new PointImpl(116.20,39.56,geo);
Point point1 = new PointImpl(120.51,30.40,geo);
double distance = geo.calcDistance(point,point1) * DistanceUtils.DEG_TO_KM;
System.out.println(distance);
}