Defined types Change Requests | OGC
OGC 09-083r3
Finally, the referencing packages include factory types also defined originally in the OGC 01- 009 specification. These object factories define a normalized approach to object instantiation
and come in two forms, the
ObjectFactories
which instantiate objects by assembling types passed as arguments and the
AuthorityFactories
which instantiate objects based on the values of some third party database, notably those in the EPSG SQL database of referencing
objects assembled by the Surveying Positioning Committee of the International Association of Oil Gas producers.
Figure 4: Referencing factories
The use of the types defined in the GeoAPI referencing and parameter packages follows the general usage pattern of the library. Since these packages provide factories, so code that
needs to instantiate one of the objects defined in these packages should first obtain a reference to the factory in some implementation dependent manner and then use the factory
methods to instantiate the desired object instances. These instances can then be used through the interface defined in the GeoAPI library. The only unusual pattern in these packages arises
because the
ParameterValue
types provide methods to set the value of the type. In the general use pattern for these types, a
ParameterValueGroup
containing all the named parameters for a method of an operation is first obtained from the
MathTransformFactory
and then each
ParameterValue
type is obtained in turn and its value set. This use pattern ensures that all the needed parameters for an operation method can be obtained as a single
block.
Copyright © 2009-2010 Open Geospatial Consortium, Inc. All Rights Reserved.
23
OGC 09-083r3