Class MapProjection
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
org.apache.sis.internal.referencing.provider.MapProjection
- All Implemented Interfaces:
Serializable,Formattable,MathTransformProvider,Deprecable,LenientComparable,org.opengis.referencing.IdentifiedObject,org.opengis.referencing.operation.OperationMethod
- Direct Known Subclasses:
AlbersEqualArea,AzimuthalEquidistantSpherical,CassiniSoldner,LambertAzimuthalEqualArea,LambertConformal1SP,LambertConformal2SP,LambertConformalBelgium,LambertConformalMichigan,LambertConformalWest,LambertCylindricalEqualArea,LambertCylindricalEqualAreaSpherical,Mercator1SP,Mercator2SP,MercatorAuxiliarySphere,MercatorSpherical,MillerCylindrical,ModifiedAzimuthalEquidistant,Mollweide,ObliqueMercator,ObliqueStereographic,Orthographic,PolarStereographicA,PolarStereographicB,PolarStereographicC,PolarStereographicNorth,PolarStereographicSouth,Polyconic,PseudoMercator,RegionalMercator,SatelliteTracking,Sinusoidal,TransverseMercator,TransverseMercatorSouth
Base class for most two-dimensional map projection providers defined in this package.
This base class defines some descriptors for the most commonly used parameters.
Subclasses will declare additional parameters and group them in a
descriptor group named
PARAMETERS.- Since:
- 0.6
- Version:
- 1.3
- Author:
- Martin Desruisseaux (Geomatys)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DefaultParameterDescriptor<Double> The ellipsoid eccentricity, computed from the semi-major and semi-minor axis lengths.static final DefaultParameterDescriptor<Double> All names known to Apache SIS for the semi-major parameter.static final DefaultParameterDescriptor<Double> All names known to Apache SIS for the semi-minor parameter.Fields inherited from class org.apache.sis.internal.referencing.provider.AbstractProvider
sourceCSType, sourceOnEllipsoid, targetCSType, targetOnEllipsoidFields 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
ConstructorsModifierConstructorDescriptionprotectedMapProjection(Class<? extends org.opengis.referencing.operation.Projection> operationType, org.opengis.parameter.ParameterDescriptorGroup parameters) Constructs a math transform provider from a set of parameters. -
Method Summary
Modifier and TypeMethodDescriptionfinal org.opengis.referencing.operation.MathTransformcreateMathTransform(org.opengis.referencing.operation.MathTransformFactory factory, org.opengis.parameter.ParameterValueGroup parameters) Creates a map projection from the specified group of parameter values.protected abstract NormalizedProjectioncreateProjection(Parameters parameters) Creates a map projection on an ellipsoid having a semi-major axis length of 1.final org.opengis.referencing.operation.OperationMethodredimension(int sourceDimensions, int targetDimensions) Deprecated.ISO 19111:2019 removed source/target dimensions attributes.static voidValidates the given parameter value.Methods inherited from class org.apache.sis.internal.referencing.provider.AbstractProvider
getOperationType, inverse, resolveAmbiguityMethods inherited from class org.apache.sis.referencing.operation.DefaultOperationMethod
castOrCopy, computeHashCode, equals, formatTo, getFormula, getInterface, getParameters, getSourceDimensions, getTargetDimensions, 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, toWKT
-
Field Details
-
SEMI_MAJOR
All names known to Apache SIS for the semi-major parameter. This parameter is mandatory and has no default value. The range of valid values is (0 … ∞).Some names for this parameter are
"semi_major","SemiMajorAxis"and"a".
Notes:Parameter names OGC: semi_major ESRI: Semi_Major NetCDF: semi_major_axis GeoTIFF: SemiMajorAxis Proj4: a - Value domain: (0.0 … ∞) m
- No default value
-
SEMI_MINOR
All names known to Apache SIS for the semi-minor parameter. This parameter is mandatory and has no default value. The range of valid values is (0 … ∞).Some names for this parameter are
"semi_minor","SemiMinorAxis"and"b".
Notes:Parameter names OGC: semi_minor ESRI: Semi_Minor NetCDF: semi_minor_axis GeoTIFF: SemiMinorAxis Proj4: b - Value domain: (0.0 … ∞) m
- No default value
-
ECCENTRICITY
The ellipsoid eccentricity, computed from the semi-major and semi-minor axis lengths. This a SIS-specific parameter.
Notes:Parameter names SIS: eccentricity - Value domain: [0.0 … 1.0]
- No default value
-
-
Constructor Details
-
MapProjection
protected MapProjection(Class<? extends org.opengis.referencing.operation.Projection> operationType, org.opengis.parameter.ParameterDescriptorGroup parameters) Constructs a math transform provider from a set of parameters. The provider identifiers will be the same than the parameter ones.- Parameters:
operationType- interface of theCoordinateOperationinstances that use this projection.parameters- the set of parameters (nevernull).
-
-
Method Details
-
redimension
@Deprecated public final org.opengis.referencing.operation.OperationMethod redimension(int sourceDimensions, int targetDimensions) Deprecated.ISO 19111:2019 removed source/target dimensions attributes.Returns this operation method with the specified number of dimensions. The number of dimensions can be only 2 or 3, and must be the same for source and target CRS.- Overrides:
redimensionin classDefaultOperationMethod- Parameters:
sourceDimensions- the desired number of input dimensions.targetDimensions- the desired number of output dimensions.- Returns:
- the redimensioned projection method, or
thisif no change is needed. - Since:
- 0.8
-
validate
public static void validate(org.opengis.parameter.ParameterDescriptor<? extends Number> descriptor, double value) throws IllegalArgumentException Validates the given parameter value. This method duplicates the verification already done byDefaultParameterValue.setValue(Object, Unit). But we check again because we have no guarantee that the parameters given by the user were instances ofDefaultParameterValue, or that the descriptor associated to the user-specifiedParameterValuehas sufficient information.- Parameters:
descriptor- the descriptor that specify the parameter to validate.value- the parameter value in the units given by the descriptor.- Throws:
IllegalArgumentException- if the given value is out of bounds.- See Also:
-
createMathTransform
public final org.opengis.referencing.operation.MathTransform createMathTransform(org.opengis.referencing.operation.MathTransformFactory factory, org.opengis.parameter.ParameterValueGroup parameters) throws org.opengis.parameter.ParameterNotFoundException, org.opengis.util.FactoryException Creates a map projection from the specified group of parameter values.- Parameters:
factory- the factory to use for creating and concatenating the (de)normalization transforms.parameters- the group of parameter values.- Returns:
- the map projection created from the given parameter values.
- Throws:
org.opengis.parameter.ParameterNotFoundException- if a required parameter was not found.org.opengis.util.FactoryException- if the map projection cannot be created.
-
createProjection
protected abstract NormalizedProjection createProjection(Parameters parameters) throws org.opengis.parameter.ParameterNotFoundException Creates a map projection on an ellipsoid having a semi-major axis length of 1.- Parameters:
parameters- the group of parameter values.- Returns:
- the map projection created from the given parameter values.
- Throws:
org.opengis.parameter.ParameterNotFoundException- if a required parameter was not found.
-