CartoType Android API 8.8-7-gb35e4dc71
for Java development on Android
Static Public Member Functions | List of all members
com.cartotype.Util Class Reference

Static Public Member Functions

static native String description ()
 
static native String version ()
 
static native String build ()
 
static native double sphericalPolygonArea (double[] aX, double[] aY)
 
static native double length (double[] aX, double[] aY)
 
static native double greatCircleDistanceInMeters (double aLong1, double aLat1, double aLong2, double aLat2)
 
static native double azimuthInDegrees (double aLong1, double aLat1, double aLong2, double aLat2)
 
static native void pointAtAzimuth (PathPoint aPoint, double aLong, double aLat, double aDir, double aDistanceInMeters)
 Finds the point in degrees at a certain distance and azimuth direction from a starting point. This function uses the WGS84 ellipsoid.
 
static native double distanceFromPoint (double[] aX, double[] aY, boolean aIsPolygon, double aPointX, double aPointY, PathPoint aNearestPoint)
 
static native String setAttribute (String aString, String aKey, String aValue)
 

Detailed Description

Utility functions.

Member Function Documentation

◆ azimuthInDegrees()

static native double com.cartotype.Util.azimuthInDegrees ( double  aLong1,
double  aLat1,
double  aLong2,
double  aLat2 
)
static

Gets the azimuth (direction along a great circle) in degrees from (aLong1,aLat1) to (aLong2,aLat2). This function uses the WGS84 ellipsoid. North is 0 and angles increase clockwise.

◆ build()

static native String com.cartotype.Util.build ( )
static

Returns the current CartoType build number as a string.

◆ description()

static native String com.cartotype.Util.description ( )
static

Returns a Git description of the current CartoType version as a string of the form MAJOR.MINOR-BUILD-COMMIT.

◆ distanceFromPoint()

static native double com.cartotype.Util.distanceFromPoint ( double[]  aX,
double[]  aY,
boolean  aIsPolygon,
double  aPointX,
double  aPointY,
PathPoint  aNearestPoint 
)
static

Gets the distance from a line of points (if aPolygon is false) or a polygon (if aPolygon is true) to the point (aPointX,aPointY) and puts the nearest point in the line or polygon in aNearestPoint.

◆ greatCircleDistanceInMeters()

static native double com.cartotype.Util.greatCircleDistanceInMeters ( double  aLong1,
double  aLat1,
double  aLong2,
double  aLat2 
)
static

Gets the great-circle distance in meters between (aLong1,aLat1) and (aLong2,aLat2). This function uses the WGS84 ellipsoid.

◆ length()

static native double com.cartotype.Util.length ( double[]  aX,
double[]  aY 
)
static

Gets the length of a line, in meters, defined by points of latitude (y) and longitude (x), using great-circle distances.

◆ setAttribute()

static native String com.cartotype.Util.setAttribute ( String  aString,
String  aKey,
String  aValue 
)
static

Sets a named attribute, treating a string as a set of map object attributes of the form label|key1=value1|key2=value2| ... |keyN=valueN, where | is character code 0, An empty or zero-length name sets the label. An empty or zero-length value deletes a name-value pair. Any of aString, aKey or aValue may be null. Returns the new string, with the attribute set.

◆ sphericalPolygonArea()

static native double com.cartotype.Util.sphericalPolygonArea ( double[]  aX,
double[]  aY 
)
static

Gets the area of a spherical polygon in square metres. The polygon is defined in degrees of latitude (y) and longitude (x).

◆ version()

static native String com.cartotype.Util.version ( )
static

Returns the current CartoType version as a string of the form MAJOR.MINOR.


The documentation for this class was generated from the following file: