Class AbstractProvider
java.lang.Object
org.apache.sis.io.wkt.FormattableObject
org.apache.sis.referencing.AbstractIdentifiedObject
org.apache.sis.referencing.operation.DefaultOperationMethod
org.apache.sis.internal.referencing.provider.AbstractProvider
- All Implemented Interfaces:
Serializable,Formattable,MathTransformProvider,Deprecable,LenientComparable,org.opengis.referencing.IdentifiedObject,org.opengis.referencing.operation.OperationMethod
- Direct Known Subclasses:
Affine,AxisOrderReversal,Equirectangular,FranceGeocentricInterpolation,GeocentricAffine,GeocentricToGeographic,GeocentricToTopocentric,Geographic2Dto3D,Geographic3Dto2D,GeographicOffsets,GeographicToGeocentric,GeographicToTopocentric,Interpolation1D,MapProjection,NADCON,NorthPoleRotation,NTv1,NTv2,PseudoPlateCarree,SouthPoleRotation,VerticalOffset,Wraparound,ZonedTransverseMercator
public abstract class AbstractProvider
extends DefaultOperationMethod
implements MathTransformProvider
Base class for all providers defined in this package.
- Since:
- 0.6
- Version:
- 1.3
- Author:
- Martin Desruisseaux (Geomatys)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Class<? extends org.opengis.referencing.cs.CoordinateSystem> The base interface of the coordinate system of source/target coordinates.final booleanFlags whether the source and/or target ellipsoid are concerned by this operation.final Class<? extends org.opengis.referencing.cs.CoordinateSystem> The base interface of the coordinate system of source/target coordinates.final booleanFlags whether the source and/or target ellipsoid are concerned by this operation.Fields inherited from class org.apache.sis.referencing.AbstractIdentifiedObject
DEPRECATED_KEY, LOCALE_KEYFields inherited from interface org.opengis.referencing.IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEYFields inherited from interface org.opengis.referencing.operation.OperationMethod
FORMULA_KEY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractProvider(Map<String, ?> properties, int sourceDimension, int targetDimension, org.opengis.parameter.ParameterDescriptorGroup parameters) Constructs a math transform provider from the given properties and a set of parameters. -
Method Summary
Modifier and TypeMethodDescriptionfinal Class<? extends org.opengis.referencing.operation.SingleOperation> Returns the interface implemented by the coordinate operation.inverse()Returns the operation method which is the inverse of this method.If an operation method is ambiguous according Apache SIS, returns the name of the method that SIS should use.Methods inherited from class org.apache.sis.referencing.operation.DefaultOperationMethod
castOrCopy, computeHashCode, equals, formatTo, getFormula, getInterface, getParameters, getSourceDimensions, getTargetDimensions, redimension, redimensionMethods inherited from class org.apache.sis.referencing.AbstractIdentifiedObject
castOrCopy, equals, formatTo, getAlias, getDescription, getIdentifiers, getName, getRemarks, hashCode, isDeprecated, isHeuristicMatchForNameMethods inherited from class org.apache.sis.io.wkt.FormattableObject
print, toString, toString, toWKTMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opengis.referencing.IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKTMethods inherited from interface org.apache.sis.referencing.operation.transform.MathTransformProvider
createMathTransform
-
Field Details
-
sourceCSType
The base interface of the coordinate system of source/target coordinates. This is used for resolving some ambiguities at WKT parsing time. -
targetCSType
The base interface of the coordinate system of source/target coordinates. This is used for resolving some ambiguities at WKT parsing time. -
sourceOnEllipsoid
public final boolean sourceOnEllipsoidFlags whether the source and/or target ellipsoid are concerned by this operation. Those flags are read byDefaultMathTransformFactoryfor determining if this operation has"semi_major","semi_minor","src_semi_major","src_semi_minor"parameters that may need to be filled with values inferred from the source or targetDefaultGeodeticDatum. Meaning of return values:- (
false,false) if neither the source coordinate system or the destination coordinate system is ellipsoidal. There are no parameters that need to be completed. - (
true,false) if this operation has"semi_major"and"semi_minor"parameters that need to be set to the axis lengths of the source ellipsoid. - (
false,true) if this operation has"semi_major"and"semi_minor"parameters that need to be set to the axis lengths of the target ellipsoid. - (
true,true) if this operation has"src_semi_major","src_semi_minor","tgt_semi_major"and"tgt_semi_minor"parameters that need to be set to the axis lengths of the source and target ellipsoids.
DefaultMathTransformFactorywill try to infer it from the type of user-specified source and target CRS. - (
-
targetOnEllipsoid
public final boolean targetOnEllipsoidFlags whether the source and/or target ellipsoid are concerned by this operation. Those flags are read byDefaultMathTransformFactoryfor determining if this operation has"semi_major","semi_minor","src_semi_major","src_semi_minor"parameters that may need to be filled with values inferred from the source or targetDefaultGeodeticDatum. Meaning of return values:- (
false,false) if neither the source coordinate system or the destination coordinate system is ellipsoidal. There are no parameters that need to be completed. - (
true,false) if this operation has"semi_major"and"semi_minor"parameters that need to be set to the axis lengths of the source ellipsoid. - (
false,true) if this operation has"semi_major"and"semi_minor"parameters that need to be set to the axis lengths of the target ellipsoid. - (
true,true) if this operation has"src_semi_major","src_semi_minor","tgt_semi_major"and"tgt_semi_minor"parameters that need to be set to the axis lengths of the source and target ellipsoids.
DefaultMathTransformFactorywill try to infer it from the type of user-specified source and target CRS. - (
-
-
Constructor Details
-
AbstractProvider
protected AbstractProvider(Map<String, ?> properties, int sourceDimension, int targetDimension, org.opengis.parameter.ParameterDescriptorGroup parameters) Constructs a math transform provider from the given properties and a set of parameters.- Parameters:
properties- set of properties. Shall contain at least"name".sourceDimension- number of dimensions in the source CRS of this operation method.targetDimension- number of dimensions in the target CRS of this operation method.parameters- the set of parameters (nevernull).
-
-
Method Details
-
resolveAmbiguity
If an operation method is ambiguous according Apache SIS, returns the name of the method that SIS should use. Otherwise returnsnull. The ambiguities that need to be resolved are:- Method "Geographic/geocentric conversions" (EPSG:9602) can be either:
"Ellipsoid_To_Geocentric"(implemented byGeographicToGeocentric"Geocentric_To_Ellipsoid"(implemented byGeocentricToGeographic
- Parameters:
context- the potentially ambiguous context.- Returns:
- name of the provider to use, or
nullif there is nothing to change. - Since:
- 0.8
- Method "Geographic/geocentric conversions" (EPSG:9602) can be either:
-
getOperationType
Returns the interface implemented by the coordinate operation. This method returns the type specified at construction time.- Overrides:
getOperationTypein classDefaultOperationMethod- Returns:
- interface implemented by all coordinate operations that use this method.
- See Also:
-
inverse
Returns the operation method which is the inverse of this method.- If
null, no inverse method is easily available. This is the default. - If
this, the inverse of this operation method is the same operation method with some parameter values changed (typically with sign inverted). - If another method, it should take the same parameter values.
This is a SIS-specific information which may be changed in any future SIS version. Current implementation provides this information in a "all or nothing" way: either all parameter values can have their sign reversed, or either the operation is considered not revertible at all. This is different than the EPSG dataset in two way:
- EPSG provides an equivalent information in the
PARAM_SIGN_REVERSALcolumn of the[Coordinate_Operation Parameter Usage]table, but on a parameter-by-parameter basis instead of for the whole operation (which is probably better). - EPSG provides another information in the
REVERSE_OPcolumn of the[Coordinate_Operation Method]table, but this is not equivalent to this method because it does not differentiate the map projection methods from inverse map projection methods.
- Returns:
- the inverse of this operation method (possibly
this), ornullif none. - See Also:
- If
-