The GeoRegistry stores georeferencing metadata and provide lookup mechanism.
sealed class
|
GeoRegistry
|
implements
|
IGeoRegistry
|
||
extends
|
SerializableBase
|
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. +------------------------------+
Serialization information about this type.
public
static
readonly
field
|
SerialId
|
||
type
|
ISerialTypeInfo
|
The built-in geo registry.
public
static
property
|
BuiltIn
{
get
}
|
||
type
|
IGeoRegistry
|
||
value
|
|
The built-in geo registry. |
Remarks:
This registry only contains the implemented map projections and some commonly-used ellipsoids and units of measure.
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).
Human-readable name of this geo registry.
public
property
|
Name
{
get
}
|
||
type
|
string
|
||
value
|
|
The geo registry name. | |
implements
|
IGeoRegistry.Name
|
Returns the serial type of this object.
public
property
|
SerialType
{
get
}
|
||
type
|
ISerialTypeInfo
|
||
value
|
|
The serial type. | |
inherited
|
SerializableBase.SerialType
|
Returns the serial data version.
public
virtual
property
|
SerialVersion
{
get
}
|
||
type
|
int32
|
||
value
|
|
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.SerializeCreates a new instance of GeoRegistry.
public
constructor
|
GeoRegistry
(string name)
|
||
params
|
name
|
[not-null]
|
Human-readable name of registry. |
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
|
|
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.SerializeLoads 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
|
|
The loaded geo registry. |
See also:
CurrentLoads 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
|
|
The loaded geo registry. |
See also:
CurrentPerforms a georegistry lookup.
public
method
|
Lookup
()
|
||
type
|
IGeoObject[]
|
||
returns
|
|
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
|
|
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
|
|
The geo object. | |
implements
|
IGeoRegistry.Lookup
|
Exceptions:
Performs a georegistry lookup.
public
method
|
LookupIds
()
|
||
type
|
GeoObjectId[]
|
||
returns
|
|
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
|
|
All IDs of geo objects of the given type. | |
implements
|
IGeoRegistry.LookupIds
|
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
|
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.
Removes a geo object from the registry.
public
method
|
Remove
(GeoObjectId key)
|
||
params
|
key
|
[not-null]
|
Key of the geo object to remove. |
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
|
Saves this georegistry to a file.
public
method
|
Save
(Path filePath)
|
||
params
|
filePath
|
[not-null]
|
The file path to save to. |
Saves this georegistry to a stream.
public
method
|
Save
([Owner]
IDataStream stream)
|
||
params
|
stream
|
[not-null]
|
The stream to save to. |
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