Package org.apache.sis.internal.feature
Class SpatialOperationContext.Projector
java.lang.Object
org.apache.sis.internal.feature.SpatialOperationContext.Projector
- Enclosing class:
- SpatialOperationContext
Creates projections centered on a given geometry.
This is defined in a separated class for lazy static field initialization.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.opengis.referencing.cs.CartesianCS
The coordinate system for projected CRS.private static final boolean
Whether the operation method used by this projector can handle longitude wraparounds as a continuous mathematical function.private static final SpatialOperationContext.Projector
The singleton instance, ornull
if its creation failed.private final org.opengis.referencing.operation.OperationMethod
The operation method for the map projection to use.A singleton map containing the name to assign to the CRS. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) org.opengis.referencing.crs.ProjectedCRS
create
(org.opengis.referencing.crs.GeographicCRS baseCRS, org.opengis.geometry.DirectPosition centroid, org.opengis.referencing.crs.CoordinateReferenceSystem geometryCRS) Creates a projected CRS derived from the given geographic CRS.(package private) static SpatialOperationContext.Projector
instance()
Returns an instance.
-
Field Details
-
CONTINUOUS_WRAPAROUND
private static final boolean CONTINUOUS_WRAPAROUNDWhether the operation method used by this projector can handle longitude wraparounds as a continuous mathematical function. It is the case of projections using longitude value only in trigonometric functions such asMath.sin(double)
. It is not the case of Mercator projection, where wraparounds cause a sudden jump from big positive values to big negative values (or conversely).- See Also:
-
name
A singleton map containing the name to assign to the CRS. -
method
private final org.opengis.referencing.operation.OperationMethod methodThe operation method for the map projection to use. -
cartCS
private final org.opengis.referencing.cs.CartesianCS cartCSThe coordinate system for projected CRS. -
INSTANCE
The singleton instance, ornull
if its creation failed.
-
-
Constructor Details
-
Projector
private Projector() throws org.opengis.util.FactoryExceptionCreates theINSTANCE
singleton.- Throws:
org.opengis.util.FactoryException
-
-
Method Details
-
create
org.opengis.referencing.crs.ProjectedCRS create(org.opengis.referencing.crs.GeographicCRS baseCRS, org.opengis.geometry.DirectPosition centroid, org.opengis.referencing.crs.CoordinateReferenceSystem geometryCRS) throws org.opengis.util.FactoryException, org.opengis.referencing.operation.TransformException, javax.measure.IncommensurableException Creates a projected CRS derived from the given geographic CRS.- Parameters:
baseCRS
- the geographic CRS for which to derive a projected CRS.centroid
- coordinate a the center of the geometry.geometryCRS
- CRS ofcentroid
.- Returns:
- CRS using Cartesian coordinate system.
- Throws:
org.opengis.referencing.operation.TransformException
- if a coordinate conversion was required but failed.javax.measure.IncommensurableException
- if a coordinate system does not use the expected units.org.opengis.util.FactoryException
-
instance
Returns an instance. Should be a singleton instance, unless its creating failed at class initialization time in which case a new attempt will be made now.- Throws:
org.opengis.util.FactoryException
-