GeoRegistry

Description

sealed class Tinman.Terrain.Georef.GeoRegistry

Derived from

SerializableBase abstract
IGeoRegistry

The GeoRegistry stores geo-referencing metadata and provide lookup mechanism.

The following figure illustrates the geo registry object model:

+---------------+
| UnitOfMeasure |                           Units of measure for length, angle and scale
+---------------+
  |
  |                    +----------------+   Well-known geodetic datum, with defined
  |                    | GeodeticDatum  |   ellipsoid and prime meridian
  |                    +----------------+
  |                       ^         |
  |     +-----------+     |         |       Ellipsoid parameters, with length unit for
  +---> | Ellipsoid | ----+         |       semi-major and semi-minor axes
  |     +-----------+     |         |
  |                       |         |
  |     +-----------+     |         |       Prime meridian, with angle unit for base
  +---> | Meridian  | ----+         |       longitude, relative to Greenwich
  |     +-----------+               |
  |                                 V
  |     +-------------------------------+   A geographic coordinate system with
  +---> | CoordinateSystem (geographic) |   longitude and latitude, specified in
  |     +-------------------------------+   angle unit.
  |                     source    target
  |                        |        |
  |                        V        V
  |                    +----------------+   Transformation between geographic coordinate
  |                    | DatumOperation |   system using different datums.
  |                    +----------------+
  |
  |               +---------------------+   Coordinate operation that transforms between
  |               | CoordinateOperation |   geographic coordinates (latitude, longitude)
  |               +---------------------+   and map coordinates (easting, northing)
  |                                 |
  |                                 V
  |     +-------------------------------+   A projected coordinate system with easting
  +---> | CoordinateSystem (projected)  |   and northing, specified in length unit.
  |     +-------------------------------+
  |
  |                   +----------------+
  |                   | VerticalDatum  |   Well-known vertical datum
  |                   +----------------+
  |                                 |
  |                                 V
  |     +------------------------------+   A vertical coordinate system, typically
  +---> | CoordinateSystem (vertical)  |   tied with geographic coordinate system.
        +------------------------------+

Public / Constructors

Geo​Registry


public constructor GeoRegistry → (1)

name in : string

[not-null]
Human-readable name of registry.

Creates a new instance of GeoRegistry.

Load

2 overloads


public static method Load1 → (1)

filePath in : Path

[not-null]
The file path.

returns → GeoRegistry

The loaded geo registry.

Loads a geo registry from a file.

IOException

If an I/O error has occurred.


public static method Load2 → (1)

stream in : IDataStream own

[not-null]
The data stream.

returns → GeoRegistry

The loaded geo registry.

Loads a geo registry from a stream.

IOException

If an I/O error has occurred.

Public / Methods

Current​Global​Pop


[ThreadSafe]
public static method CurrentGlobalPop → ()

returns → bool

true if the previous registry has been restored or if the scope has become empty,
false if the scope already was empty.

Restores the registry that has previously been active in the global scope.

Current​Local​Pop


[ThreadSafe]
public static method CurrentLocalPop → ()

returns → bool

true if the previous registry has been restored or if the scope has become empty,
false if the scope already was empty.

Restores the registry that has previously been active in the thread-local scope.

Put

3 overloads


public method Put1 → (1)

other in : IGeoRegistry

[not-null]
The other geo registry.

Puts all geo objects of the given other in geo registry into this one.

When a geo object is registered for the first time, the given code will become its primary code. Only primary codes are returned for reverse lookups. Registering the same geo object with more codes will only add aliases for the primary code.


public method Put2 → (3)

code in : int32

The geo object code.

authority in : GeoAuthority

[not-null]
The geo authority.

value in : IGeoObject

[not-null]
The get object.

Puts the given geo object into the registry, overwriting already existing mappings.

When a geo object is registered for the first time, the given code will become its primary code. Only primary codes are returned for reverse lookups. Registering the same geo object with more codes will only add aliases for the primary code.


public method Put3 → (3)

code in : string

[not-empty]
The geo object code.

authority in : GeoAuthority

[not-null]
The geo authority.

value in : IGeoObject

[not-null]
The get object.

Puts the given geo object into the registry, overwriting already existing mappings.

When a geo object is registered for the first time, the given code will become its primary code. Only primary codes are returned for reverse lookups. Registering the same geo object with more codes will only add aliases for the primary code.

Remove


public method Remove → (1)

key in : GeoObjectId

[not-null]
Key of the geo object to remove.

Removes a geo object from the registry.

Save

2 overloads


public method Save1 → (1)

filePath in : Path

[not-null]
The file path to save to.

Saves this geo registry to a file.

IOException

If an I/O error has occurred.


public method Save2 → (1)

stream in : IDataStream own

[not-null]
The stream to save to.

Saves this geo registry to a stream.

IOException

If an I/O error has occurred.

Public / Attributes

Built​In


public static attribute BuiltIn → (get)

value : IGeoRegistry

[not-null]
The built-in geo registry.

The built-in geo registry.

This registry only contains the implemented map projections and some commonly-used ellipsoids and units of measure.

Current


[ThreadSafe]
public static attribute Current → (get)

value : IGeoRegistry

The active geo registry for the calling thread.

Returns the active geo registry for the calling thread.

The active geo registry is found by the following logic:

  1. The registry that has been specified for the thread-local scope, by the innermost call pair to IGeoRegistry.CurrentLocalPush and CurrentLocalPop.

  2. The registry that has been specified for the global scope, by the innermost call pair to IGeoRegistry.CurrentGlobalPush and CurrentGlobalPop.

  3. The built-in registry, see BuiltIn.

Current​Inherit


[ThreadSafe]
public static attribute CurrentInherit → (get)

value : IBeginEnd

[not-null]
The IBeginEnd object.

Wraps the active registry of the calling thread, for being inherited by other threads.

This method returns a IBeginEnd object that calls IGeoRegistry.CurrentLocalPush and CurrentLocalPop for IBeginEnd.Begin and IBeginEnd.End, using the active registry of the calling thread, obtained via Current.

Serialization

Serial​Id


public static readonly attribute SerialId → (ISerialTypeInfo)

Serialization information about this type.