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 georegistry 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

GeoRegistry


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 → (3)

filePath in : Path

[not-null]
The file path.

makeCurrent opt : bool = true

Make the loaded registry the Current one?

createConfig opt : bool = false

Create config types for the entries of the registry?

returns → GeoRegistry

The loaded geo registry.

Loads a geo registry from a file.

IOException

If an I/O error has occurred.

ConfigException

If createConfig opt is true and an errors has occurred while creating the config types, for example because of a type name that already exists.


public static method Load2 → (3)

stream in : IDataStream

[not-null]
The data stream.

makeCurrent opt : bool = true

Make the loaded registry the Current one?

createConfig opt : bool = false

Create config types for the entries of the registry?

returns → GeoRegistry

The loaded geo registry.

Loads a geo registry from a stream.

IOException

If an I/O error has occurred.

ConfigException

If createConfig opt is true and an errors has occurred while creating the config types, for example because of a type name that already exists.

Public / Methods

Put

2 overloads


public method Put1 → (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 Put2 → (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 georegistry to a file.

IOException

If an I/O error has occurred.


public method Save2 → (1)

stream in : IDataStream

[not-null]
The stream to save to.

Saves this georegistry to a stream.

IOException

If an I/O error has occurred.

Public / Attributes

BuiltIn


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


public static attribute Current → (get,set)

value : IGeoRegistry

The active geo registry.

The active geo registry.

If no active geo registry has been specified, the built-in registry will be used (see BuiltIn).

Serialization

SerialId


public static readonly attribute SerialId → (ISerialTypeInfo)

Serialization information about this type.