Commit eea3dda8 authored by sunyuhua's avatar sunyuhua

gps坐标系的转化,本小程序使用的火星坐标系

parent 7c38ca7c
......@@ -14,8 +14,8 @@ public class GpsTransform {
public static List<PlaceMark> placeMarker2Baidu(List<PlaceMark> placeMarkList) {
for (PlaceMark pm : placeMarkList) {
Point bdPoint = gpsToBD(pm.getLatitude(), pm.getLongitude());
pm.setBaiduLat(bdPoint.getLat());
pm.setBaiduLng(bdPoint.getLon());
pm.setLatitude(bdPoint.getLat());
pm.setLongitude(bdPoint.getLon());
}
return placeMarkList;
}
......@@ -26,8 +26,8 @@ public class GpsTransform {
public static List<TracePoint> tracePoint2Baidu(List<TracePoint> tracePointList) {
for (TracePoint tp : tracePointList) {
Point bdPoint = gpsToBD(tp.getLatitude(), tp.getLongitude());
tp.setBaiduLat(bdPoint.getLat());
tp.setBaiduLng(bdPoint.getLon());
tp.setLatitude(bdPoint.getLat());
tp.setLongitude(bdPoint.getLon());
}
return tracePointList;
}
......@@ -38,8 +38,8 @@ public class GpsTransform {
public static List<PlaceMark> placeMarker2Mar(List<PlaceMark> placeMarkList) {
for (PlaceMark pm : placeMarkList) {
Point marPoint = gpsToMar(pm.getLatitude(), pm.getLongitude());
pm.setMarLat(marPoint.getLat());
pm.setMarLng(marPoint.getLon());
pm.setLatitude(marPoint.getLat());
pm.setLongitude(marPoint.getLon());
}
return placeMarkList;
}
......@@ -50,8 +50,8 @@ public class GpsTransform {
public static List<TracePoint> tracePoint2Mar(List<TracePoint> tracePointList) {
for (TracePoint tp : tracePointList) {
Point marPoint = gpsToMar(tp.getLatitude(), tp.getLongitude());
tp.setMarLat(marPoint.getLat());
tp.setMarLng(marPoint.getLon());
tp.setLatitude(marPoint.getLat());
tp.setLongitude(marPoint.getLon());
}
return tracePointList;
}
......
......@@ -80,6 +80,7 @@ public class GpxParserUtil {
}
// 轨迹点转换火星坐标系,本系统小程序使用的火星坐标系
route.setTracePoint(GpsTransform.tracePoint2Mar(route.getTracePoint()));
// 路标转化为火星坐标系,本系统小程序使用的火星坐标系
route.setPlaceMark(GpsTransform.placeMarker2Mar(route.getPlaceMark()));
} catch (Exception e) {
......
......@@ -16,18 +16,6 @@ public class PlaceMark {
// 纬度
private double longitude;
// 百度坐标系经度
private double baiduLat;
// 百度坐标系纬度
private double baiduLng;
//火星坐标系的经度
private double marLat;
//火星坐标系的维度
private double marLng;
// 海拔
private double altitude;
......@@ -58,21 +46,6 @@ public class PlaceMark {
this.longitude = longitude;
}
public double getBaiduLat() {
return baiduLat;
}
public void setBaiduLat(double baiduLat) {
this.baiduLat = baiduLat;
}
public double getBaiduLng() {
return baiduLng;
}
public void setBaiduLng(double baiduLng) {
this.baiduLng = baiduLng;
}
public double getAltitude() {
return altitude;
......@@ -90,19 +63,4 @@ public class PlaceMark {
this.type = type;
}
public double getMarLat() {
return marLat;
}
public void setMarLat(double marLat) {
this.marLat = marLat;
}
public double getMarLng() {
return marLng;
}
public void setMarLng(double marLng) {
this.marLng = marLng;
}
}
spring.profiles.active=test
spring.profiles.active=dev
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment