LuciadCPillar C# 2023.1.04
Luciad.Grids.LonLat.LonLatFormat Class Reference

Class to format points as LonLat coordinates. More...

Inheritance diagram for Luciad.Grids.LonLat.LonLatFormat:

Public Member Functions

 LonLatFormat ()
 Creates a new LonLatFormat from the default format "lat(-DMS), lon(-DMS)". More...
 
 LonLatFormat (string pattern)
 Creates a new LonLatFormat from the given pattern. More...
 
void Dispose ()
 
string Format (Luciad.Cartesian.Coordinate lonLatCoord)
 Format the given LonLat Coordinate according to this LonLatFormat. More...
 
string Format (Luciad.Geometries.Point lonLatPoint)
 Format the given Point according to this LonLatFormat. More...
 
string FormatLat (double lat)
 Format the given latitude according to this LonLatFormat. More...
 
string FormatLon (double lon)
 Format the given longitude according to this LonLatFormat. More...
 
string ToPattern ()
 Get the pattern string used to create this format. More...
 

Static Public Member Functions

static bool IsValidFormatString (string format)
 Returns if the given string is a valid LonLat format string. More...
 

Detailed Description

Class to format points as LonLat coordinates.

The EBNF for the pattern syntax is pattern = lon, separator, lat | lat, separator, lon lon = "lon(", { "+" | "-" }, { axis | degrees | minutes | seconds }+, ")" lat = "lat(", { "+" | "-" }, { axis | degrees | minutes | seconds }+, ")" axis = "a" degrees = { "d" | "D" }+, { digit }* minutes = { "m" | "M" }+, { digit }* seconds = { "s" | "S" }+, { digit }* digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" separator = { ? any character ? } where "{ x }" means x is optional, "{ x }*" means x occurs zero or more times, and "{ x }+" means x occurs at least once. The table below details the meaning of each pattern character. Symbol Meaning Examples

d Integer degrees.* d: 12, ddd: 012

d<n> Degrees with <n> fractional digits.* d2: 12.34, ddd2: 012.34

D Integer degrees with degrees symbol.* D: 12°, DDD: 012°

D<n> Degrees with symbol and <n> fractional digits.* D2: 12.34°, DDD2: 012.34°

m Integer minutes.* m: 3, mm: 03

m<n> Minutes with <n> fractional digits.* m2: 3.45, mm2: 03.45

M Integer minutes with degrees symbol.* M: 3', MM: 03'

M<n> Minutes with symbol and <n> fractional digits.* M2: 3.45', MM2: 03.45'

s Integer seconds.* s: 7, ss: 07

s<n> Seconds with <n> fractional digits.* s2: 7.89, ss2: 07.89

S Integer seconds with degrees symbol.* S: 7", SS: 07"

S<n> Seconds with symbol and <n> fractional digits.* S2: 7.89", SS2: 07.89"

  • Coordinate sign. Results in a + if the coordinate is positive, and a - if it is negative. +, -
  • Coordinate sign. Results in a - if the coordinate is negative.

a Hemisphere indicator N, S, E, W

Repeating this character pads the number with leading zeros. As an example, the default formatting pattern is "lat(-DMS), lon(-DMS)". This results in a format that generates formatted coordinates like -12°34'56", 123°45'12". 2023.1

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::LonLatFormat.

Constructor & Destructor Documentation

◆ LonLatFormat() [1/2]

Luciad.Grids.LonLat.LonLatFormat.LonLatFormat ( )
inline

Creates a new LonLatFormat from the default format "lat(-DMS), lon(-DMS)".

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::LonLatFormat::LonLatFormat.

◆ LonLatFormat() [2/2]

Luciad.Grids.LonLat.LonLatFormat.LonLatFormat ( string  pattern)
inline

Creates a new LonLatFormat from the given pattern.

pattern

the pattern string.

luciad::InvalidArgumentException

if pattern is not a valid pattern.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::LonLatFormat::LonLatFormat.

Member Function Documentation

◆ Dispose()

void Luciad.Grids.LonLat.LonLatFormat.Dispose ( )
inline

◆ Format() [1/2]

string Luciad.Grids.LonLat.LonLatFormat.Format ( Luciad.Cartesian.Coordinate  lonLatCoord)
inline

Format the given LonLat Coordinate according to this LonLatFormat.

lonLatCoord

the Coordinate.

the formatted string.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::LonLatFormat::format.

◆ Format() [2/2]

string Luciad.Grids.LonLat.LonLatFormat.Format ( Luciad.Geometries.Point  lonLatPoint)
inline

Format the given Point according to this LonLatFormat.

lonLatPoint

the Point.

the formatted string.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::LonLatFormat::format.

◆ FormatLat()

string Luciad.Grids.LonLat.LonLatFormat.FormatLat ( double  lat)
inline

Format the given latitude according to this LonLatFormat.

lat

the latitude.

the formatted string.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::LonLatFormat::formatLat.

◆ FormatLon()

string Luciad.Grids.LonLat.LonLatFormat.FormatLon ( double  lon)
inline

Format the given longitude according to this LonLatFormat.

lon

the longitude.

the formatted string.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::LonLatFormat::formatLon.

◆ IsValidFormatString()

bool Luciad.Grids.LonLat.LonLatFormat.IsValidFormatString ( string  format)
inlinestatic

Returns if the given string is a valid LonLat format string.

format

the format string.

true if the string is a valid LonLat format string.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::LonLatFormat::isValidFormatString.

◆ ToPattern()

string Luciad.Grids.LonLat.LonLatFormat.ToPattern ( )
inline

Get the pattern string used to create this format.

the pattern string.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::LonLatFormat::toPattern.