com.supermap.ar.areffect
类 ConvertTool
- java.lang.Object
-
- com.supermap.ar.areffect.ConvertTool
-
public class ConvertTool extends java.lang.Object
转换工具
-
-
构造器概要
构造器 构造器和说明 ConvertTool()
-
方法概要
所有方法 静态方法 具体方法 限定符和类型 方法和说明 static Location
calculateDeviceLocation(Location targetLocation, Point3D targetPosition, float startAzimuth)
计算设备的地理位置static Point3D
convertToArPosition(EffectBaseView arEffectBaseView, Location position)
根据经纬度计算AR场景坐标static Point3D
convertToArPosition(Location startLocation, Location targetLocation, float startAzimuth)
根据经纬度计算AR场景坐标static Location
convertToLocation(EffectBaseView arEffectBaseView, Point3D position)
根据AR场景中的绝对位置获取地理位置static Location
convertToLocation(Point3D position, Location startLocation, float startAzimuth)
根据AR场景中的绝对位置获取地理位置static float
getArea(java.util.List<Vector3> pointList)
获取面积static float
getAreaByPoint3D(java.util.List<Point3D> pointList)
获取面积static float
getAreaByVector3(java.util.List<Vector3> pointList)
获取面积static float
getDistance(double lon1, double lat1, double lon2, double lat2)
获取距离static float
getDistance(Point3D a, Point3D b)
获取距离static float
getDistance(Point a, Point b)
获取距离static float
getDistance(Vector3 a, Vector3 b)
获取距离static Point3D
getPointAfterRotation(Point3D a, Point3D b, float rotationAngle)
获取在XOY平面,B点绕A点旋转后的点坐标static float[]
getTranslation(Location locationA, Location locationB)
获取WGS84坐标系下B点相对A点的偏移量static Location
toWGSCoordinatesFromGCJ(Location location)
GCJ坐标转WGS坐标
-
-
-
方法详细资料
-
convertToArPosition
public static Point3D convertToArPosition(EffectBaseView arEffectBaseView, Location position)
根据经纬度计算AR场景坐标- 参数:
arEffectBaseView
-position
-- 返回:
-
convertToArPosition
public static Point3D convertToArPosition(Location startLocation, Location targetLocation, float startAzimuth)
根据经纬度计算AR场景坐标- 参数:
startLocation
-targetLocation
-startAzimuth
-- 返回:
-
convertToLocation
public static Location convertToLocation(EffectBaseView arEffectBaseView, Point3D position)
根据AR场景中的绝对位置获取地理位置- 参数:
arEffectBaseView
-position
-- 返回:
-
convertToLocation
public static Location convertToLocation(Point3D position, Location startLocation, float startAzimuth)
根据AR场景中的绝对位置获取地理位置- 参数:
position
-startLocation
-startAzimuth
-- 返回:
-
calculateDeviceLocation
public static Location calculateDeviceLocation(Location targetLocation, Point3D targetPosition, float startAzimuth)
计算设备的地理位置- 参数:
targetLocation
-targetPosition
-startAzimuth
-- 返回:
-
getDistance
public static float getDistance(double lon1, double lat1, double lon2, double lat2)
获取距离- 参数:
lon1
-lat1
-lon2
-lat2
-- 返回:
-
getDistance
public static float getDistance(Vector3 a, Vector3 b)
获取距离- 参数:
a
-b
-- 返回:
-
getAreaByVector3
public static float getAreaByVector3(java.util.List<Vector3> pointList)
获取面积- 参数:
pointList
-- 返回:
-
getAreaByPoint3D
public static float getAreaByPoint3D(java.util.List<Point3D> pointList)
获取面积- 参数:
pointList
-- 返回:
-
toWGSCoordinatesFromGCJ
public static Location toWGSCoordinatesFromGCJ(Location location)
GCJ坐标转WGS坐标- 参数:
location
-- 返回:
-
getPointAfterRotation
public static Point3D getPointAfterRotation(Point3D a, Point3D b, float rotationAngle)
获取在XOY平面,B点绕A点旋转后的点坐标- 参数:
a
-b
-rotationAngle
-- 返回:
-
getArea
public static float getArea(java.util.List<Vector3> pointList)
获取面积- 参数:
pointList
-- 返回:
-
getTranslation
public static float[] getTranslation(Location locationA, Location locationB)
获取WGS84坐标系下B点相对A点的偏移量- 参数:
locationA
-locationB
-- 返回:
- deltaX和deltaY,单位米
-
getDistance
public static float getDistance(Point a, Point b)
获取距离- 参数:
a
-b
-- 返回:
-
-