Class GeodeticObjectFactory

Object
AbstractFactory
GeodeticObjectFactory
All Implemented Interfaces:
Parser, CRSFactory, CSFactory, Datum­Factory, Object­Factory, Factory

public class GeodeticObjectFactory extends AbstractFactory implements CRSFactory, CSFactory, DatumFactory, Parser
Creates Coordinate Reference System (CRS) implementations, with their Coordinate System (CS) and Datum components. This factory serves two purposes:
  • For users, allows the creation of complex objects that cannot be created by the authority factories, without explicit dependency to Apache SIS (when using the GeoAPI interfaces implemented by this class).
  • For providers, allows inversion of control by overriding methods in this class, then specifying the customized instance to other services that consume CRSFactory (for example authority factories or WKT parsers).
This Geodetic­Object­Factory class is not easy to use directly. Users are encouraged to use an authority factory instead (or the CRS​.for­Code(String) convenience method) when the CRS object to construct can be identified by a code in the namespace of an authority (typically EPSG).

Object properties

Most factory methods expect a Map<String,?> argument, often followed by explicit arguments. Unless otherwise noticed, information provided in the properties map are considered ignorable metadata while information provided in explicit arguments have an impact on coordinate transformation results.

The following table lists the keys recognized by the Geodetic­Object­Factory default implementation, together with the type of values associated to those keys. A value for the "name" key is mandatory for all objects, while all other properties are optional. Geodetic­Object­Factory methods ignore all unknown properties.

Recognized properties (non exhaustive list)
Property name Value type Returned by
"name" Identifier or String AbstractIdentifiedObject.getName()
"authority" String or Citation ImmutableIdentifier.getAuthority() on the name
"code" String ImmutableIdentifier.getCode() on the name
"codespace" String ImmutableIdentifier.getCodeSpace() on the name
"version" String ImmutableIdentifier.getVersion() on the name
"description" String ImmutableIdentifier.getDescription() on the name
"alias" GenericName or Char­Sequence (optionally as array) AbstractIdentifiedObject.getAlias()
"identifiers" Identifier (optionally as array) AbstractIdentifiedObject.getIdentifiers()
"domains" DefaultObjectDomain (optionally as array) AbstractIdentifiedObject.getDomains()
"domainOfValidity" Extent DefaultObjectDomain.getDomainOfValidity()
"scope" String or International­String DefaultObjectDomain.getScope()
"anchorPoint" InternationalString or String AbstractDatum.getAnchorPoint()
"realizationEpoch" Date AbstractDatum.getRealizationEpoch()
"remarks" InternationalString or String AbstractIdentifiedObject.getRemarks()
"deprecated" Boolean AbstractIdentifiedObject.isDeprecated()
"locale" Locale (none)

Localization

All localizable attributes like "remarks" may have a language and country code suffix. For example, the "remarks_fr" property stands for remarks in French and the "remarks_fr_CA" property stands for remarks in French Canadian. They are convenience properties for building the International­String value.

The "locale" property applies only in case of exception for formatting the error message, and is used only on a best effort basis. The locale is discarded after successful construction since localizations are applied by the International­String​.to­String(Locale) method.

Since:
0.6