com.supermap.ar.areffect
Class ConvertTool
- java.lang.Object
-
- com.supermap.ar.areffect.ConvertTool
-
public class ConvertTool extends java.lang.Object
Conversion tools
-
-
Constructor Summary
Constructors Constructor and Description ConvertTool()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static Location
calculateDeviceLocation(Location targetLocation, Point3D targetPosition, float startAzimuth)
Calculates the geographical position of the devicestatic Point3D
convertToArPosition(EffectBaseView arEffectBaseView, Location position)
Calculates the coordinate system of an AR scene according to longitude and latitudestatic Point3D
convertToArPosition(Location startLocation, Location targetLocation, float startAzimuth)
Calculates the coordinate system of an AR scene according to longitude and latitudestatic Location
convertToLocation(AREffectBaseView arEffectBaseView, Point3D position)
Gets geographical positions according to the absolute position on an AR scenestatic Location
convertToLocation(Point3D position, Location startLocation, float startAzimuth)
Gets geographical positions according to the absolute position on an AR scenestatic float
getArea(java.util.List<Vector3> pointList)
Gets areastatic float
getAreaByPoint3D(java.util.List<Point3D> pointList)
Gets areastatic float
getAreaByVector3(java.util.List<Vector3> pointList)
Gets areastatic float
getDistance(double lon1, double lat1, double lon2, double lat2)
Gets distancestatic float
getDistance(Point3D a, Point3D b)
Gets distancestatic float
getDistance(Point a, Point b)
Gets distancestatic float
getDistance(Vector3 a, Vector3 b)
Gets distancestatic Point3D
getPointAfterRotation(Point3D a, Point3D b, float rotationAngle)
Gets the coordinate system of the resulting point of B rotating around A in the XOY planestatic Location
toWGSCoordinatesFromGCJ(Location location)
Converts from GCJ to WGS
-
-
-
Method Detail
-
convertToArPosition
public static Point3D convertToArPosition(EffectBaseView arEffectBaseView, Location position)
Calculates the coordinate system of an AR scene according to longitude and latitude- Parameters:
arEffectBaseView
-position
-- Returns:
-
convertToArPosition
public static Point3D convertToArPosition(Location startLocation, Location targetLocation, float startAzimuth)
Calculates the coordinate system of an AR scene according to longitude and latitude- Parameters:
startLocation
-targetLocation
-startAzimuth
-- Returns:
-
convertToLocation
public static Location convertToLocation(AREffectBaseView arEffectBaseView, Point3D position)
Gets geographical positions according to the absolute position on an AR scene- Parameters:
arEffectBaseView
-position
-- Returns:
-
convertToLocation
public static Location convertToLocation(Point3D position, Location startLocation, float startAzimuth)
Gets geographical positions according to the absolute position on an AR scene- Parameters:
position
-startLocation
-startAzimuth
-- Returns:
-
calculateDeviceLocation
public static Location calculateDeviceLocation(Location targetLocation, Point3D targetPosition, float startAzimuth)
Calculates the geographical position of the device- Parameters:
targetLocation
-targetPosition
-startAzimuth
-- Returns:
-
getDistance
public static float getDistance(double lon1, double lat1, double lon2, double lat2)
Gets distance- Parameters:
lon1
-lat1
-lon2
-lat2
-- Returns:
-
getDistance
public static float getDistance(Point3D a, Point3D b)
Gets distance- Parameters:
a
-b
-- Returns:
-
getDistance
public static float getDistance(Vector3 a, Vector3 b)
Gets distance- Parameters:
a
-b
-- Returns:
-
getAreaByVector3
public static float getAreaByVector3(java.util.List<Vector3> pointList)
Gets area- Parameters:
pointList
-- Returns:
-
getAreaByPoint3D
public static float getAreaByPoint3D(java.util.List<Point3D> pointList)
Gets area- Parameters:
pointList
-- Returns:
-
toWGSCoordinatesFromGCJ
public static Location toWGSCoordinatesFromGCJ(Location location)
Converts from GCJ to WGS- Parameters:
location
-- Returns:
-
getPointAfterRotation
public static Point3D getPointAfterRotation(Point3D a, Point3D b, float rotationAngle)
Gets the coordinate system of the resulting point of B rotating around A in the XOY plane- Parameters:
a
-b
-rotationAngle
-- Returns:
-
getArea
public static float getArea(java.util.List<Vector3> pointList)
Gets area- Parameters:
pointList
-- Returns:
-
getDistance
public static float getDistance(Point a, Point b)
Gets distance- Parameters:
a
-b
-- Returns:
-
-