CoordinateSystemBuilder

Description

sealed class Tinman.Terrain.Georef.CoordinateSystemBuilder

Helper class for building CoordinateSystem objects.

To build a CoordinateSystem object, performs these steps:

  1. Optionally choose a IGeoRegistry to use for looking up individual components by their identifier. Without a registry, all components must be specified by their defining values or by providing a IGeoObject instance.

  2. Create a CoordinateSystemBuilder object, passing the chosen registry.

  3. Use the instance fields to specify data for the coordinate system components:
    Compound, DatumGeodetic, DatumVertical, DatumEllipsoid, Horizontal, DatumMeridian, Operation, Vertical.

  4. Call Build and check for Messages.

  5. Use ReverseLookup to find the identifier of a given component.

Public / Constructors

Build


public method Build → ()

returns → CoordinateSystem

The built object or null if incomplete or invalid data has been specified.

Builds a CoordinateSystem from the current settings.

Before using the result value, the caller should use Messages to see whether the builder has emitted error messages. For each coordinate system component, the build process runs through these steps:

  1. The component name is normalized, see CoordinateSystemBuilderWithName.Name.

  2. A registry lookup is performed, see CoordinateSystemBuilderComponent.Identifier).

  3. If CoordinateSystemBuilderComponent.GeoObject is null and CoordinateSystemBuilderComponent.IsEmpty returns false, a new geo object is built, based on the values of the component.

In addition to the non-empty case, the following conditions trigger building of geo objects:

Finally, the first non-null coordinate system is returned:

If all coordinate systems are null, this method also returns null.

Coordinate​System​Builder


public constructor CoordinateSystemBuilder → (1)

registry opt : IGeoRegistry = null

The geo registry to use for looking up IDs.

Creates a new instance of CoordinateSystemBuilder.

Public / Methods

Combine


public static method Combine → (3)

horizontal in : CoordinateSystem

The horizontal coordinate system to combine.

vertical in : CoordinateSystem

The vertical coordinate system to combine.

name opt : string = null

Optional name of the combined coordinate system.

returns → CoordinateSystem

The resulting compound system.

Combines this coordinate system with the given one.

Reset


public method Reset → ()

Resets all fields to their default values and clears the validation messages.

Reverse​Lookup


[Pure]
public method ReverseLookup → (1)

geoObject in : IGeoObject

The IGeoObject instance that has been built by this class.

returns → GeoObjectId

The parsed geo object identifier or null if there is none or if geoObject in is null.

Returns the GeoObjectId object for the given built IGeoObject instance.

This method looks for the CoordinateSystemBuilderComponent.GeoObject value that is equal to (see IGeoObject.EqualsWithName) geoObject in. If found, the corresponding CoordinateSystemBuilderComponent.Identifier is returned.

Public / Attributes

Compound


public readonly attribute Compound → (CoordinateSystemBuilderWithName<CoordinateSystem>)

The compound coordinate system.

Datum​Ellipsoid


public readonly attribute DatumEllipsoid → (CoordinateSystemBuilderEllipsoid)

The ellipsoid of the geodetic datum.

Datum​Geodetic


public readonly attribute DatumGeodetic → (CoordinateSystemBuilderWithName<GeodeticDatum>)

The geodetic datum.

Datum​Meridian


public readonly attribute DatumMeridian → (CoordinateSystemBuilderMeridian)

The prime meridian of the geodetic datum.

Datum​Vertical


public readonly attribute DatumVertical → (CoordinateSystemBuilderWithName<VerticalDatum>)

The vertical datum.

Horizontal


public readonly attribute Horizontal → (CoordinateSystemBuilderWithFlags)

The horizontal coordinate system.

Coordinates of geographic and local coordinate systems are interpreted in the unit of this component, see CoordinateSystemBuilderWithUnit.Unit. If Operation has a geo object, a projected coordinate system is built (see CoordinateSystem.IsProjection). Otherwise, if DatumGeodetic has a geo object, a geographic coordinate system is built (see CoordinateSystem.IsGeographic). Otherwise, a local coordinate system is built (see CoordinateSystem.IsLocal).

Messages


public attribute Messages → (get)

value : ValidateResult

[not-null]
The validation messages.

Returns the validation messages that have been generated during the last call to Build.

Operation


public readonly attribute Operation → (CoordinateSystemBuilderOperation)

The coordinate operation that applies the map projection.

Coordinates of projected coordinate systems are interpreted in the unit of this component, see CoordinateSystemBuilderWithUnit.Unit.

Registry


public attribute Registry → (get)

value : IGeoRegistry

The geo registry or null.

The geo registry that is used by this coordinate system builder.

Vertical


public readonly attribute Vertical → (CoordinateSystemBuilderWithFlags)

The vertical coordinate system.