TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class GeoRegistry in Tinman.Terrain.Georef

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

sealed class GeoRegistry implements IGeoRegistry
  extends SerializableBase

Remarks

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.
        +------------------------------+

Private / Constructors

GeoRegistry

Creates a new instance of GeoRegistry.

[Internal]
public constructor GeoRegistry ()

Public / Attributes

BuiltIn

The built-in geo registry.

public static property BuiltIn { get }
type IGeoRegistry
value [not-null] The built-in geo registry.

Remarks:

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

Current

The active geo registry.

public static property Current { get set }
type IGeoRegistry
value The active geo registry.

Remarks:

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

Name

Human-readable name of this geo registry.

public property Name { get }
type string
value [not-null] The geo registry name.
implements IGeoRegistry.Name

SerialType

Returns the serial type of this object.

public property SerialType { get }
type ISerialTypeInfo
value [not-null] The serial type.
inherited SerializableBase.SerialType

SerialVersion

Returns the serial data version.

public virtual property SerialVersion { get }
type int32
value [>=1] The serial data version tag.
inherited SerializableBase.SerialVersion

Remarks:

An ISerializable implementation is required to support all versions up to the one returned by SerialVersion.

See also:

ISerializable.Serialize
ISerializable.Deserialize

Public / Constructors

GeoRegistry

Creates a new instance of GeoRegistry.

public constructor GeoRegistry (string name)
params name [not-null] Human-readable name of registry.

Load

Loads a geo registry from a file.

public static method Load (Path filePath, bool makeCurrent = true, bool createConfig = false)
type GeoRegistry
params filePath [not-null] The file path.
  makeCurrent Make the loaded registry the Current one?
  createConfig Create config types for the entries of the registry? Defaults to false.
returns [not-null] The loaded geo registry.

See also:

Current

Exceptions:


Loads a geo registry from a stream.

public static method Load ([Owner] IDataStream stream, bool makeCurrent = true, bool createConfig = false)
type GeoRegistry
params stream [not-null] The data stream.
  makeCurrent Make the loaded registry the Current one?
  createConfig Create config types for the entries of the registry? Defaults to false.
returns [not-null] The loaded geo registry.

See also:

Current

Exceptions:

Public / Methods

Deserialize

Initializes the state of this object from the given data stream.

public override method Deserialize (int32 serialVersion, ISerializer data)
type ISerializable
params serialVersion [>=1] The serial data version.
  data [not-null] The serial data stream.
returns [not-null] The deserialized object. This will typically be this, but in some circumstances, another instance may be returned (e.g. singletons).
overrides SerializableBase.Deserialize

Remarks:

The Deserialize method will be called immediately after the object has been instantiated via its default constructor.

The provided serialVersion number is guaranteed to be equal to or less than the SerialVersion returned by this object (i.e. ISerializable object must provide backwards compatibility).

See also:

ISerializable.Serialize
ISerializable.SerialVersion

Exceptions:

Lookup

Performs a georegistry lookup.

public method Lookup ()
type IGeoObject[]
returns [not-null] All geo objects in the registry.
implements IGeoRegistry.Lookup

Performs a georegistry lookup.

public method Lookup (GeoObjectType type)
type IGeoObject[]
params type The geo object type.
returns [not-null] All geo objects of the given type.
implements IGeoRegistry.Lookup

Performs a georegistry lookup.

public method Lookup (GeoObjectType type, string key, GeoAuthority authority)
type IGeoObject
params type The geo object type.
  key [not-empty] The geo object key.
  authority [not-null] The geo authority.
returns [not-null] The geo object.
implements IGeoRegistry.Lookup

Exceptions:

LookupIds

Performs a georegistry lookup.

public method LookupIds ()
type GeoObjectId[]
returns [not-null] All IDs of geo objects in the registry.
implements IGeoRegistry.LookupIds

Performs a georegistry lookup.

public method LookupIds (GeoObjectType type)
type GeoObjectId[]
params type The geo object type.
returns [not-null] All IDs of geo objects of the given type.
implements IGeoRegistry.LookupIds

LookupNull

Performs a georegistry lookup.

public method LookupNull (GeoObjectType type, string key, GeoAuthority authority)
type IGeoObject
params type The geo object type.
  key [not-empty] The geo object key.
  authority [not-null] The geo authority.
returns The geo object or null if not found.
implements IGeoRegistry.LookupNull

Put

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

public method Put (int32 code, GeoAuthority authority, IGeoObject value)
params code The geo object code.
  authority [not-null] The geo authority.
  value [not-null] The get object.

Remarks:

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.


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

public method Put (string code, GeoAuthority authority, IGeoObject value)
params code [not-empty] The geo object code.
  authority [not-null] The geo authority.
  value [not-null] The get object.

Remarks:

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

Removes a geo object from the registry.

public method Remove (GeoObjectId key)
params key [not-null] Key of the geo object to remove.

ReverseLookup

Performs a reverse georegistry lookup.

public method ReverseLookup (IGeoObject obj)
type GeoObjectId
params obj [not-null] The geo object to find.
returns The geo object ID or null if not found.
implements IGeoRegistry.ReverseLookup

Save

Saves this georegistry to a file.

public method Save (Path filePath)
params filePath [not-null] The file path to save to.

Exceptions:


Saves this georegistry to a stream.

public method Save ([Owner] IDataStream stream)
params stream [not-null] The stream to save to.

Exceptions:

Serialize

Serializes the current state of this object to the given data stream.

public override method Serialize (ISerializer data)
params data [not-null] The serial data stream.
overrides SerializableBase.Serialize

See also:

ISerializable.Deserialize
ISerializable.SerialVersion

Exceptions:

Serialization

SerialId

Serialization information about this type.

public static readonly field SerialId
type ISerialTypeInfo