CartoType UWP API 9.2-11-g041bcfff8
for development in C#, VB.NET and C++
Static Public Member Functions | List of all members
CartoType::Util Class Reference

General utility functions More...

#include <CartoTypeWrapper.h>

Static Public Member Functions

static String ^ Description ()
 Returns a Git description of the current CartoType version as a string of the form MAJOR.MINOR-BUILD-COMMIT.
 
static String ^ Version ()
 Returns the current CartoType version as a string of the form MAJOR.MINOR.
 
static String ^ Build ()
 Returns the current CartoType build as a string.
 
static double GreatCircleDistanceInMeters (double aLong1, double aLat1, double aLong2, double aLat2)
 Returns the great-circle distance in meters between (aLong1,aLat1) and (aLong2,aLat2). This function uses the WGS84 ellipsoid.
 
static double AzimuthInDegrees (double aLong1, double aLat1, double aLong2, double aLat2)
 Returns the azimuth (direction along a great circle) in degrees from (aLong1,aLat1) to (aLong2,aLat2). More...
 
static PointPointAtAzimuth (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 String ^ SetAttribute (String^ aString, String^ aKey, String^ aValue)
 Sets an attribute in a string to be used when creating a map object. More...
 
static String ^ ErrorString (Result aError)
 Returns a short description of an error, given its code.
 
static String ^ UKGridReferenceFromDegrees (PointValue aPointInDegrees, int aDigits)
 Converts a point in degrees latitude and longitude (WGS84) into a UK Ordnance Survey national grid reference. More...
 
static PointValue PointInDegreesFromUKGridReference (String^ aGridReference)
 Converts a UK Ordnance Survey national grid reference (two capital letters followed by an even number of digits) into a point in degrees latitude and longitude (WGS84). More...
 

Detailed Description

General utility functions

Member Function Documentation

◆ AzimuthInDegrees()

static double CartoType::Util::AzimuthInDegrees ( double  aLong1,
double  aLat1,
double  aLong2,
double  aLat2 
)
static

Returns 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.

◆ PointInDegreesFromUKGridReference()

static PointValue CartoType::Util::PointInDegreesFromUKGridReference ( String^  aGridReference)
static

Converts a UK Ordnance Survey national grid reference (two capital letters followed by an even number of digits) into a point in degrees latitude and longitude (WGS84).

The point returned is the center of the square defined by the grid reference. Returns the point (0,0) if the grid reference is invalid.

◆ SetAttribute()

static String ^ CartoType::Util::SetAttribute ( String^  aString,
String^  aKey,
String^  aValue 
)
static

Sets an attribute in a string to be used when creating a map object.

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, set a named attribute. An empty or zero-length name sets the label. An empty or zero-length value deletes a name-value pair.

Returns the new string, with the attribute set.

◆ UKGridReferenceFromDegrees()

static String ^ CartoType::Util::UKGridReferenceFromDegrees ( PointValue  aPointInDegrees,
int  aDigits 
)
static

Converts a point in degrees latitude and longitude (WGS84) into a UK Ordnance Survey national grid reference.

aDigits is the number of digits per coordinate, which is clamped to the range 0...5. Five-digit references are accurate to a meter. Returns null if the point is outside the UK national grid bounds.


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