Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
micro_app
gk
Commits
eea3dda8
Commit
eea3dda8
authored
Apr 30, 2020
by
sunyuhua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gps坐标系的转化,本小程序使用的火星坐标系
parent
7c38ca7c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
51 deletions
+10
-51
GpsTransform.java
...om/dlbridge/jadp/plugins/cmpt/utils/gps/GpsTransform.java
+8
-8
GpxParserUtil.java
...m/dlbridge/jadp/plugins/cmpt/utils/gps/GpxParserUtil.java
+1
-0
PlaceMark.java
...a/com/dlbridge/jadp/plugins/cmpt/utils/gps/PlaceMark.java
+0
-42
application.properties
src/main/resources/application.properties
+1
-1
No files found.
src/main/java/com/dlbridge/jadp/plugins/cmpt/utils/gps/GpsTransform.java
View file @
eea3dda8
...
@@ -14,8 +14,8 @@ public class GpsTransform {
...
@@ -14,8 +14,8 @@ public class GpsTransform {
public
static
List
<
PlaceMark
>
placeMarker2Baidu
(
List
<
PlaceMark
>
placeMarkList
)
{
public
static
List
<
PlaceMark
>
placeMarker2Baidu
(
List
<
PlaceMark
>
placeMarkList
)
{
for
(
PlaceMark
pm
:
placeMarkList
)
{
for
(
PlaceMark
pm
:
placeMarkList
)
{
Point
bdPoint
=
gpsToBD
(
pm
.
getLatitude
(),
pm
.
getLongitude
());
Point
bdPoint
=
gpsToBD
(
pm
.
getLatitude
(),
pm
.
getLongitude
());
pm
.
set
BaiduLat
(
bdPoint
.
getLat
());
pm
.
set
Latitude
(
bdPoint
.
getLat
());
pm
.
set
BaiduLng
(
bdPoint
.
getLon
());
pm
.
set
Longitude
(
bdPoint
.
getLon
());
}
}
return
placeMarkList
;
return
placeMarkList
;
}
}
...
@@ -26,8 +26,8 @@ public class GpsTransform {
...
@@ -26,8 +26,8 @@ public class GpsTransform {
public
static
List
<
TracePoint
>
tracePoint2Baidu
(
List
<
TracePoint
>
tracePointList
)
{
public
static
List
<
TracePoint
>
tracePoint2Baidu
(
List
<
TracePoint
>
tracePointList
)
{
for
(
TracePoint
tp
:
tracePointList
)
{
for
(
TracePoint
tp
:
tracePointList
)
{
Point
bdPoint
=
gpsToBD
(
tp
.
getLatitude
(),
tp
.
getLongitude
());
Point
bdPoint
=
gpsToBD
(
tp
.
getLatitude
(),
tp
.
getLongitude
());
tp
.
set
BaiduLat
(
bdPoint
.
getLat
());
tp
.
set
Latitude
(
bdPoint
.
getLat
());
tp
.
set
BaiduLng
(
bdPoint
.
getLon
());
tp
.
set
Longitude
(
bdPoint
.
getLon
());
}
}
return
tracePointList
;
return
tracePointList
;
}
}
...
@@ -38,8 +38,8 @@ public class GpsTransform {
...
@@ -38,8 +38,8 @@ public class GpsTransform {
public
static
List
<
PlaceMark
>
placeMarker2Mar
(
List
<
PlaceMark
>
placeMarkList
)
{
public
static
List
<
PlaceMark
>
placeMarker2Mar
(
List
<
PlaceMark
>
placeMarkList
)
{
for
(
PlaceMark
pm
:
placeMarkList
)
{
for
(
PlaceMark
pm
:
placeMarkList
)
{
Point
marPoint
=
gpsToMar
(
pm
.
getLatitude
(),
pm
.
getLongitude
());
Point
marPoint
=
gpsToMar
(
pm
.
getLatitude
(),
pm
.
getLongitude
());
pm
.
set
MarLat
(
marPoint
.
getLat
());
pm
.
set
Latitude
(
marPoint
.
getLat
());
pm
.
set
MarLng
(
marPoint
.
getLon
());
pm
.
set
Longitude
(
marPoint
.
getLon
());
}
}
return
placeMarkList
;
return
placeMarkList
;
}
}
...
@@ -50,8 +50,8 @@ public class GpsTransform {
...
@@ -50,8 +50,8 @@ public class GpsTransform {
public
static
List
<
TracePoint
>
tracePoint2Mar
(
List
<
TracePoint
>
tracePointList
)
{
public
static
List
<
TracePoint
>
tracePoint2Mar
(
List
<
TracePoint
>
tracePointList
)
{
for
(
TracePoint
tp
:
tracePointList
)
{
for
(
TracePoint
tp
:
tracePointList
)
{
Point
marPoint
=
gpsToMar
(
tp
.
getLatitude
(),
tp
.
getLongitude
());
Point
marPoint
=
gpsToMar
(
tp
.
getLatitude
(),
tp
.
getLongitude
());
tp
.
set
MarLat
(
marPoint
.
getLat
());
tp
.
set
Latitude
(
marPoint
.
getLat
());
tp
.
set
MarLng
(
marPoint
.
getLon
());
tp
.
set
Longitude
(
marPoint
.
getLon
());
}
}
return
tracePointList
;
return
tracePointList
;
}
}
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/utils/gps/GpxParserUtil.java
View file @
eea3dda8
...
@@ -80,6 +80,7 @@ public class GpxParserUtil {
...
@@ -80,6 +80,7 @@ public class GpxParserUtil {
}
}
// 轨迹点转换火星坐标系,本系统小程序使用的火星坐标系
// 轨迹点转换火星坐标系,本系统小程序使用的火星坐标系
route
.
setTracePoint
(
GpsTransform
.
tracePoint2Mar
(
route
.
getTracePoint
()));
route
.
setTracePoint
(
GpsTransform
.
tracePoint2Mar
(
route
.
getTracePoint
()));
// 路标转化为火星坐标系,本系统小程序使用的火星坐标系
// 路标转化为火星坐标系,本系统小程序使用的火星坐标系
route
.
setPlaceMark
(
GpsTransform
.
placeMarker2Mar
(
route
.
getPlaceMark
()));
route
.
setPlaceMark
(
GpsTransform
.
placeMarker2Mar
(
route
.
getPlaceMark
()));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/utils/gps/PlaceMark.java
View file @
eea3dda8
...
@@ -16,18 +16,6 @@ public class PlaceMark {
...
@@ -16,18 +16,6 @@ public class PlaceMark {
// 纬度
// 纬度
private
double
longitude
;
private
double
longitude
;
// 百度坐标系经度
private
double
baiduLat
;
// 百度坐标系纬度
private
double
baiduLng
;
//火星坐标系的经度
private
double
marLat
;
//火星坐标系的维度
private
double
marLng
;
// 海拔
// 海拔
private
double
altitude
;
private
double
altitude
;
...
@@ -58,21 +46,6 @@ public class PlaceMark {
...
@@ -58,21 +46,6 @@ public class PlaceMark {
this
.
longitude
=
longitude
;
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
()
{
public
double
getAltitude
()
{
return
altitude
;
return
altitude
;
...
@@ -90,19 +63,4 @@ public class PlaceMark {
...
@@ -90,19 +63,4 @@ public class PlaceMark {
this
.
type
=
type
;
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
;
}
}
}
src/main/resources/application.properties
View file @
eea3dda8
spring.profiles.active
=
test
spring.profiles.active
=
dev
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment