CoordinateSystemBuilder
Description
Helper class for building CoordinateSystem objects.
To build a CoordinateSystem object, performs these steps:
-
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.
-
Create a CoordinateSystemBuilder object, passing the chosen registry.
-
Use the instance fields to specify data for the coordinate system components:
Compound, DatumGeodetic, DatumVertical, DatumEllipsoid, Horizontal, DatumMeridian, Operation, Vertical. -
Use ReverseLookup to find the identifier of a given component.
Public / Constructors
Build
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:
-
The component name is normalized, see CoordinateSystemBuilderWithName.Name.
-
A registry lookup is performed, see CoordinateSystemBuilderComponent.Identifier).
-
If CoordinateSystemBuilderComponent.GeoObject is
nulland CoordinateSystemBuilderComponent.IsEmpty returnsfalse, 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:
-
DatumMeridian:
If DatumEllipsoid has a non-null geo object. -
DatumGeodetic:
If both DatumEllipsoid and DatumMeridian have a non-null geo object. -
Operation:
If CoordinateSystemBuilderOperation.Method has a non-null geo object. -
Horizontal:
If DatumGeodetic has a non-null geo object. -
Vertical:
If DatumVertical has a non-null geo object. -
Compound:
If both Horizontal and Vertical have a non-null geo object.
Finally, the first non-null coordinate system is returned:
If all coordinate systems are null, this method also returns null.
Public / Methods
ReverseLookup
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
Horizontal
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).
Operation
The coordinate operation that applies the map projection.
Coordinates of projected coordinate systems are interpreted in the unit of this component, see CoordinateSystemBuilderWithUnit.Unit.
- See also