LatLonRange

Description

struct Tinman.Terrain.Georef.LatLonRange

The LatLonRange structure represents a geographic range of latitude and longitude angles.

Wrap-around of longitude angles is handled properly. Latitude angles are implicitly clamped to [-90..90] degrees.

Public / Constants

Undefined


public static readonly attribute Undefined → (LatLonRange)

An undefined range of geographic coordinates.

This value can be used as the initial value for building a geographic range by using Grow.

Public / Constructors

For

4 overloads


public static method For1 → (1)

latLon in : LatLon

The geographic coordinates.

returns → LatLonRange

The geographic range.

Creates a new instance of LatLonRange which contains the given coordinates.


public static method For2 → (2)

in : LatLon

The first geographic coordinates.

in : LatLon

The second geographic coordinates.

returns → LatLonRange

The geographic range.

Creates a new instance of LatLonRange which contains the given coordinates.


public static method For3 → (2)

latitude in : float64

The latitude angle, in degrees.

longitude in : float64

The longitude angle, in degrees.

returns → LatLonRange

The geographic range.

Creates a new instance of LatLonRange which contains the given coordinates.


public static method For4 → (4)

latitudeA in : float64

The first latitude angle, in degrees.

longitudeA in : float64

The first longitude angle, in degrees.

latitudeB in : float64

The second latitude angle, in degrees.

longitudeB in : float64

The second longitude angle, in degrees.

returns → LatLonRange

The geographic range.

Creates a new instance of LatLonRange which contains the given coordinates.

Public / Methods

Contains

2 overloads


[Pure]
public method Contains1 → (2)

latitude in : float64

The latitude angle, in degrees.

longitude in : float64

The longitude angle, in degrees.

returns → bool

true if the given coordinates are contained in this range,
false if not.

Checks if this range contains the given coordinates.


[Pure]
public method Contains2 → (1)

latLon in : LatLon

The geographic coordinates.

returns → bool

true if the given coordinates are contained in this range,
false if not.

Checks if this range contains the given coordinates.

Grow

2 overloads


[Pure]
public method Grow1 → (1)

latLon in : LatLon

The geographic coordinates to contain.

returns → LatLonRange

The resulting geographic range.

Grows this geographic range until it contains the given coordinates.

Undefined coordinate values will be ignored (see LatLon.IsUndefinedCoordinate).


[Pure]
public method Grow2 → (2)

latitude in : float64

The latitude angle, in degrees.

longitude in : float64

The longitude angle, in degrees.

returns → LatLonRange

The resulting geographic range.

Grows this geographic range until it contains the given coordinates.

Undefined coordinate values will be ignored (see LatLon.IsUndefinedCoordinate).

Public / Attributes

End


public readonly attribute End → (LatLon)

End of the geographic range.

The LatLon value will always be normalized (see LatLon.Normalize).

Is​Undefined


public attribute IsUndefined → (get)

value : bool

true if the range is undefined, false if not.

Is this geographic range undefined?

Latitude


public attribute Latitude → (get)

value : float64

[0..180]
The latitude range.

Returns the size of the latitude range.

Longitude


public attribute Longitude → (get)

value : float64

[0..360]
The longitude range.

Returns the size of the longitude range.

Start


public readonly attribute Start → (LatLon)

Start of the geographic range.

The LatLon value will always be normalized (see LatLon.Normalize).

Serialization

Serializer


public static readonly attribute Serializer → (ITypeSerializer<LatLonRange>)

The serialization helper object for values of LatLonRange.