Class SpatialOperationContext.Projector

java.lang.Object
org.apache.sis.internal.feature.SpatialOperationContext.Projector
Enclosing class:
SpatialOperationContext

private static final class SpatialOperationContext.Projector extends Object
Creates projections centered on a given geometry. This is defined in a separated class for lazy static field initialization.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private 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.
    The singleton instance, or null if its creation failed.
    private final org.opengis.referencing.operation.OperationMethod
    The operation method for the map projection to use.
    private final Map<String,?>
    A singleton map containing the name to assign to the CRS.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Creates the INSTANCE singleton.
  • Method Summary

    Modifier and Type
    Method
    Description
    (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
    Returns an instance.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • CONTINUOUS_WRAPAROUND

      private static final boolean CONTINUOUS_WRAPAROUND
      Whether 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 as Math.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

      private final Map<String,?> name
      A singleton map containing the name to assign to the CRS.
    • method

      private final org.opengis.referencing.operation.OperationMethod method
      The operation method for the map projection to use.
    • cartCS

      private final org.opengis.referencing.cs.CartesianCS cartCS
      The coordinate system for projected CRS.
    • INSTANCE

      private static final SpatialOperationContext.Projector INSTANCE
      The singleton instance, or null if its creation failed.
  • Constructor Details

    • Projector

      private Projector() throws org.opengis.util.FactoryException
      Creates the INSTANCE 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 of centroid.
      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

      static SpatialOperationContext.Projector instance() throws org.opengis.util.FactoryException
      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