|
|
@ -1158,7 +1158,6 @@ public class DcTrafficStatisticsServiceImpl implements IDcTrafficStatisticsServi |
|
|
|
String stakeMark = formatNumber(startPileNo); |
|
|
|
jsonObject.put("stakeMark", stakeMark);//
|
|
|
|
String link_lng_lats = jsonObject.getString("link_lng_lats"); |
|
|
|
System.out.println("排序前:"+link_lng_lats); |
|
|
|
String string = jsonObject.getString("list_link_info"); |
|
|
|
JSONArray jsonlist = JSON.parseArray(string); |
|
|
|
JSONObject o = (JSONObject) jsonlist.get(UniversalEnum.ZERO.getNumber()); |
|
|
@ -1176,9 +1175,9 @@ public class DcTrafficStatisticsServiceImpl implements IDcTrafficStatisticsServi |
|
|
|
locations.add(new Location(Double.parseDouble(s2[1]), Double.parseDouble(s2[0]))); // 示例地点1
|
|
|
|
} |
|
|
|
double fixedLat = firstLat; // Los Angeles的纬度
|
|
|
|
System.out.println("Lat Angeles的纬度"+fixedLat); |
|
|
|
// System.out.println("Lat Angeles的纬度"+fixedLat);
|
|
|
|
double fixedLon = firstLon; // Los Angeles的经度
|
|
|
|
System.out.println("Lon Angeles的纬度"+fixedLon); |
|
|
|
// System.out.println("Lon Angeles的纬度"+fixedLon);
|
|
|
|
|
|
|
|
// 根据距离固定点的远近排序
|
|
|
|
// Collections.sort(locations, Comparator.comparingDouble(location -> haversineDistance(fixedLat, fixedLon, location.latitude, location.longitude)));
|
|
|
@ -1200,7 +1199,7 @@ public class DcTrafficStatisticsServiceImpl implements IDcTrafficStatisticsServi |
|
|
|
} |
|
|
|
String sortedLngLats = sortedLngLatsBuilder.toString(); |
|
|
|
jsonObject.put("link_lng_lats",sortedLngLats); |
|
|
|
System.out.println("排序后的坐标字符串:" + sortedLngLats); |
|
|
|
// System.out.println("排序后的坐标字符串:" + sortedLngLats);
|
|
|
|
|
|
|
|
|
|
|
|
//as_one_road
|
|
|
|