CartoType .NET API 7.8.2, 2022-03-25
for development in C#, Visual Basic and other .NET languages
Static Public Member Functions | List of all members
CartoType::Util Class Referenceabstract

General utility functions More...

#include <CartoTypeWrapper.h>

Static Public Member Functions

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 GetSphericalPolygonArea (array< double >^ aX, array< double >^ aY)
 Gets the area of a spherical polygon in square metres. The polygon is defined in degrees of latitude (y) and longitude (x).
 
static double GetLength (array< double >^ aX, array< double >^ aY)
 Gets the length of a line, in meters, defined by points of latitude (y) and longitude (x), using great-circle distances.
 
static double GetGreatCircleDistanceInMeters (double aLong1, double aLat1, double aLong2, double aLat2)
 Gets the great-circle distance in meters between (aLong1,aLat1) and (aLong2,aLat2). This function uses the WGS84 ellipsoid.
 
static double GetAzimuthInDegrees (double aLong1, double aLat1, double aLong2, double aLat2)
 Gets the azimuth (direction along a great circle) in degrees from (aLong1,aLat1) to (aLong2,aLat2). More...
 
static PointGetPointAtAzimuth (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 double GetDistanceFromPoint (array< double >^ aX, array< double >^ aY, bool aIsPolygon, double aPointX, double aPointY, Point^ aNearestPoint)
 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.
 
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 int IntAttribute (String^ aThreeLetterCode, int aType)
 Constructs an integer attribute from a three-letter code and a type. More...
 
static String ^ ErrorString (Result aError)
 Returns a short description of an error, given its code.
 

Detailed Description

General utility functions

Member Function Documentation

◆ GetAzimuthInDegrees()

static double CartoType::Util::GetAzimuthInDegrees ( 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.

◆ IntAttribute()

static int CartoType::Util::IntAttribute ( String^  aThreeLetterCode,
int  aType 
)
static

Constructs an integer attribute from a three-letter code and a type.

Constructs an integer attribute from an optional three-letter code, placed in the high 16 bits by encoding each letter in five bits, and a type number placed in the low 16 bits.

The three-letter code is used only if it consists of exactly three lower-case letters in the range a...z.

Three-letter codes are used for mnemonic purposes, as for example "pub" for a public house, and can be tested easily in style sheets.

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


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