Class DefaultProjection
java.lang.Object
org.apache.sis.io.wkt.FormattableObject
org.apache.sis.referencing.AbstractIdentifiedObject
org.apache.sis.referencing.operation.AbstractCoordinateOperation
org.apache.sis.referencing.operation.AbstractSingleOperation
org.apache.sis.referencing.operation.DefaultConversion
org.apache.sis.referencing.operation.DefaultProjection
- All Implemented Interfaces:
Serializable,Formattable,Parameterized,Deprecable,LenientComparable,org.opengis.referencing.IdentifiedObject,org.opengis.referencing.operation.Conversion,org.opengis.referencing.operation.CoordinateOperation,org.opengis.referencing.operation.Projection,org.opengis.referencing.operation.SingleOperation
- Direct Known Subclasses:
DefaultConicProjection,DefaultCylindricalProjection,DefaultPlanarProjection
class DefaultProjection
extends DefaultConversion
implements org.opengis.referencing.operation.Projection
A conversion from (longitude, latitude) coordinates to Cartesian coordinates
(x,y).
An unofficial list of projections and their parameters can be found there. Most projections expect the following parameters:
"central_meridian"(default to 0),"latitude_of_origin"(default to 0),"scale_factor"(default to 1),"false_easting"(default to 0) and"false_northing"(default to 0).
- Since:
- 0.6
- Version:
- 0.6
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longSerial number for inter-operability with different versions.Fields inherited from class org.apache.sis.referencing.operation.AbstractSingleOperation
parametersFields inherited from class org.apache.sis.referencing.operation.AbstractCoordinateOperation
coordinateOperationAccuracy, domainOfValidity, sourceCRS, targetCRS, transformFields inherited from class org.apache.sis.referencing.AbstractIdentifiedObject
DEPRECATED_KEY, LOCALE_KEYFields inherited from interface org.opengis.referencing.operation.CoordinateOperation
COORDINATE_OPERATION_ACCURACY_KEY, DOMAIN_OF_VALIDITY_KEY, OPERATION_VERSION_KEY, SCOPE_KEYFields inherited from interface org.opengis.referencing.IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY -
Constructor Summary
ConstructorsModifierConstructorDescriptionDefaultProjection(Map<String, ?> properties, org.opengis.referencing.crs.GeographicCRS sourceCRS, org.opengis.referencing.crs.ProjectedCRS targetCRS, org.opengis.referencing.operation.OperationMethod method, org.opengis.referencing.operation.MathTransform transform) Creates a projection from the given properties.(package private)DefaultProjection(org.opengis.referencing.operation.Conversion definition, org.opengis.referencing.crs.CoordinateReferenceSystem sourceCRS, org.opengis.referencing.crs.CoordinateReferenceSystem targetCRS, org.opengis.referencing.operation.MathTransformFactory factory, org.opengis.referencing.operation.OperationMethod[] actual) Creates a new projection with the same values than the specified one, together with the specified source and target CRS.protectedDefaultProjection(org.opengis.referencing.operation.Projection operation) Creates a new coordinate operation with the same values than the specified one. -
Method Summary
Modifier and TypeMethodDescriptionClass<? extends org.opengis.referencing.operation.Projection>Returns the GeoAPI interface implemented by this class.final org.opengis.referencing.crs.GeographicCRSReturns the source CRS, which must be geographic ornull.final org.opengis.referencing.crs.ProjectedCRSReturns the target CRS, which must be projected ornull.Methods inherited from class org.apache.sis.referencing.operation.DefaultConversion
castOrCopy, specializeMethods inherited from class org.apache.sis.referencing.operation.AbstractSingleOperation
afterUnmarshal, equals, getMethod, getParameterDescriptors, getParameterValues, setParameterValuesMethods inherited from class org.apache.sis.referencing.operation.AbstractCoordinateOperation
castOrCopy, checkDimensions, computeHashCode, computeTransientFields, formatTo, getCoordinateOperationAccuracy, getDomainOfValidity, getInterpolationCRS, getInterpolationCRS, getLinearAccuracy, getMathTransform, getOperationVersion, getParameterDescriptors, getScope, getWrapAroundChanges, isDefiningConversionMethods 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.operation.Conversion
getOperationVersionMethods inherited from interface org.opengis.referencing.operation.CoordinateOperation
getCoordinateOperationAccuracy, getDomainOfValidity, getMathTransform, getScopeMethods inherited from interface org.opengis.referencing.IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKTMethods inherited from interface org.opengis.referencing.operation.SingleOperation
getMethod, getParameterValues
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerial number for inter-operability with different versions.- See Also:
-
-
Constructor Details
-
DefaultProjection
public DefaultProjection(Map<String, ?> properties, org.opengis.referencing.crs.GeographicCRS sourceCRS, org.opengis.referencing.crs.ProjectedCRS targetCRS, org.opengis.referencing.operation.OperationMethod method, org.opengis.referencing.operation.MathTransform transform) Creates a projection from the given properties.- Parameters:
properties- the properties to be given to the identified object.sourceCRS- the source CRS.targetCRS- the target CRS.method- the coordinate operation method.transform- transform from positions in the source CRS to positions in the target CRS.
-
DefaultProjection
DefaultProjection(org.opengis.referencing.operation.Conversion definition, org.opengis.referencing.crs.CoordinateReferenceSystem sourceCRS, org.opengis.referencing.crs.CoordinateReferenceSystem targetCRS, org.opengis.referencing.operation.MathTransformFactory factory, org.opengis.referencing.operation.OperationMethod[] actual) throws org.opengis.util.FactoryException Creates a new projection with the same values than the specified one, together with the specified source and target CRS. While the source conversion can be an arbitrary one, it is typically a defining conversion.- Parameters:
definition- the defining conversion.sourceCRS- the source CRS.targetCRS- the target CRS.factory- the factory to use for creating a transform from the parameters or for performing axis changes.actual- an array of length 1 where to store the actual operation method used by the math transform factory.- Throws:
org.opengis.util.FactoryException
-
DefaultProjection
protected DefaultProjection(org.opengis.referencing.operation.Projection operation) Creates a new coordinate operation with the same values than the specified one. This copy constructor provides a way to convert an arbitrary implementation into a SIS one or a user-defined one (as a subclass), usually in order to leverage some implementation-specific API.This constructor performs a shallow copy, i.e. the properties are not cloned.
- Parameters:
operation- the coordinate operation to copy.
-
-
Method Details
-
getInterface
Returns the GeoAPI interface implemented by this class. The default implementation returnsProjection.class. Subclasses implementing a more specific GeoAPI interface shall override this method.- Overrides:
getInterfacein classDefaultConversion- Returns:
- the conversion interface implemented by this class.
-
getSourceCRS
public final org.opengis.referencing.crs.GeographicCRS getSourceCRS()Returns the source CRS, which must be geographic ornull.- Specified by:
getSourceCRSin interfaceorg.opengis.referencing.operation.Conversion- Specified by:
getSourceCRSin interfaceorg.opengis.referencing.operation.CoordinateOperation- Overrides:
getSourceCRSin classAbstractCoordinateOperation- Returns:
- the source CRS, or
nullif not available.
-
getTargetCRS
public final org.opengis.referencing.crs.ProjectedCRS getTargetCRS()Returns the target CRS, which must be projected ornull.- Specified by:
getTargetCRSin interfaceorg.opengis.referencing.operation.Conversion- Specified by:
getTargetCRSin interfaceorg.opengis.referencing.operation.CoordinateOperation- Overrides:
getTargetCRSin classAbstractCoordinateOperation- Returns:
- the target CRS, or
nullif not available.
-