GeorefUtil

Description

static class Tinman.Terrain.Georef.GeorefUtil

Helper class for this namespace.

Public / Methods

Face​Bounds


[Pure]
public static method FaceBounds → (1)

radius in : float64

[>0]
Radius of reference sphere.

returns → Box2D

The map bounds.

Returns the map bounds for CoordinateOperationMethod.Face.

Heading​To​Cardinal


[Pure]
public static method HeadingToCardinal → (2)

heading in : float64

The heading angle, will normalized with LatLon.NormalizeLongitude360 before finding the cardinal label.

step opt : int32 = 1

[1..3]
The step to use for moving through the cardinal label:
1 : 22.5° => N, NNE, NE, ENE, E, ESE, SE, SSE, S, SSW, SW, WSW, W, WNW, NW, NNW
2 : 45° => N, NE, E, SE, S, SW, W, NW
3 : 90° => N, E, S, W

returns → string

The cardinal label that is closest to heading in.

Maps the given heading angle to its nearest cardinal label.

These are the cardinal labels:
'N' : 0°
'NNE' : 22.5°
'NE' : 45°
'ENE' : 67.5°
'E' : 90°
'ESE' : 112.5°
'SE' : 135°
'SSE' : 157.5°
'S' : 180°
'SSW' : 202.5°
'SW' : 225°
'WSW' : 247.5°
'W' : 270°
'WNW' : 292.5°
'NW' : 315°
'NNW' : 337.5°

Heading​To​Map


[Pure]
public static method HeadingToMap → (1)

heading in : float64

The heading angle, in degrees (0° points northwards).

returns → Vec2D

The unit-length direction vector:
Vec2D.X: easting
Vec2D.Y: northing

Converts the given heading angle into a direction vector.

Map​To​Heading

2 overloads


[Pure]
public static method MapToHeading1 → (1)

eastingNorthing in : Vec2D

The easting (see Vec2D.X) and northing (see Vec2D.Y) values.

returns → float64

The heading angle, in degrees.

Converts the given direction vector into a heading angle (0° points northwards).


[Pure]
public static method MapToHeading2 → (2)

easting in : float64

Map easting coordinate.

northing in : float64

Map northing coordinate.

returns → float64

The heading angle, in degrees.

Converts the given direction vector into a heading angle (0° points northwards).

Projection


public static method Projection → (3)

source in : IGeorefInfo

[not-null]
The source geo-reference.

target in : IGeorefInfo

[not-null]
The target geo-reference.

transform opt : IDatumTransform = null

Optional datum transformation. If null, a suitable transformation will be determined from the geo-references, if possible.

returns → IMapProjectionFactory

The map projection factory.

Helper for creating a IMapProjectionFactory for the given source in and target in geo-references.

GeorefException

If the geo-reference parameters are incomplete or invalid.