Class Equirectangular

All Implemented Interfaces:
Serializable, Formattable, MathTransformProvider, Deprecable, LenientComparable, org.opengis.referencing.IdentifiedObject, org.opengis.referencing.operation.OperationMethod

public final class Equirectangular extends AbstractProvider
The provider for "Equidistant Cylindrical (Spherical)" projection (EPSG:1029, EPSG:9823). In the particular case where the longitude of origin and the standard parallel are 0°, this projection is also known as "Plate Carrée".

At the difference of most other map projection providers, this class does not extend MapProjection because it does not create non-liner kernel. Instead, the projection created by this class is implemented by an affine transform.

This provider is not suitable for the Equidistant Cylindrical projection (EPSG:1028, EPSG:9842). EPSG defines Equidistant Cylindrical projection as the ellipsoidal case of this projection, which uses a more complicated formula than the affine transform used here.

Note: EPSG:1028 and 1029 are the current codes, while EPSG:9842 and 9823 are deprecated codes. The new and deprecated definitions differ only by their parameters. In the Apache SIS implementation, both current and legacy definitions are known, but the legacy names are marked as deprecated.
Since:
0.6
Version:
1.3
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For cross-version compatibility.
      See Also:
    • NAME

      public static final String NAME
      Name of this projection in EPSG geodetic dataset.
      See Also:
    • STANDARD_PARALLEL

      public static final org.opengis.parameter.ParameterDescriptor<Double> STANDARD_PARALLEL
      The operation parameter descriptor for the Latitude of 1st standard parallel (φ₁) parameter value. Valid values range is (-90 … 90)° and default value is 0°.
      Parameter names
      EPSG: Latitude of 1st standard parallel
      OGC: standard_parallel_1
      ESRI: Standard_Parallel_1
      NetCDF: standard_parallel
      GeoTIFF: StdParallel1
      Proj4: lat_ts
      Notes:
      • Value domain: (-90.0 … 90.0)°
    • LATITUDE_OF_ORIGIN

      static final org.opengis.parameter.ParameterDescriptor<Double> LATITUDE_OF_ORIGIN
      The operation parameter descriptor for the Latitude of natural origin (φ₀) parameter value. Valid values range is (-90 … 90)° and default value is 0°.

      In theory, this parameter should not be used and its value should be 0 in all cases. This parameter is included for completeness in CRS labeling only, and is declared optional.

      Parameter names
      EPSG: Latitude of natural origin
      OGC: latitude_of_origin
      ESRI: Latitude_Of_Origin
      NetCDF: latitude_of_projection_origin
      GeoTIFF: CenterLat
      Proj4: lat_0
      Notes:
      • Value restricted to 0
      • Optional
    • LONGITUDE_OF_ORIGIN

      public static final org.opengis.parameter.ParameterDescriptor<Double> LONGITUDE_OF_ORIGIN
      The operation parameter descriptor for the Longitude of natural origin (λ₀) parameter value. Valid values range is [-180 … 180]° and default value is 0°.
      Parameter names
      EPSG: Longitude of natural origin
      OGC: central_meridian
      ESRI: Central_Meridian
      NetCDF: longitude_of_projection_origin
      GeoTIFF: CenterLong
      Proj4: lon_0
    • FALSE_EASTING

      public static final org.opengis.parameter.ParameterDescriptor<Double> FALSE_EASTING
      The operation parameter descriptor for the False easting (FE) parameter value. Valid values range is unrestricted and default value is 0 metre.
      Parameter names
      EPSG: False easting
      OGC: false_easting
      ESRI: False_Easting
      NetCDF: false_easting
      GeoTIFF: FalseEasting
      Proj4: x_0
    • FALSE_NORTHING

      public static final org.opengis.parameter.ParameterDescriptor<Double> FALSE_NORTHING
      The operation parameter descriptor for the False northing (FN) parameter value. Valid values range is unrestricted and default value is 0 metre.
      Parameter names
      EPSG: False northing
      OGC: false_northing
      ESRI: False_Northing
      NetCDF: false_northing
      GeoTIFF: FalseNorthing
      Proj4: y_0
    • PARAMETERS

      static final org.opengis.parameter.ParameterDescriptorGroup PARAMETERS
      The group of all parameters expected by this coordinate operation.
  • Constructor Details

  • Method Details

    • getAndStore

      private static double getAndStore(Parameters source, org.opengis.parameter.ParameterValueGroup target, org.opengis.parameter.ParameterDescriptor<Double> descriptor) throws IllegalArgumentException
      Gets a parameter value identified by the given descriptor and stores it only if different than zero. This method performs the same work than Initializer.getAndStore(ParameterDescriptor) in the org.apache.sis.referencing.operation.projection package.
      Parameters:
      source - the parameters from which to read the value.
      target - where to store the parameter values.
      descriptor - the descriptor that specify the parameter names and desired units.
      Returns:
      the parameter value in the units given by the descriptor.
      Throws:
      IllegalArgumentException - if the given value is out of bounds.
    • createMathTransform

      public org.opengis.referencing.operation.MathTransform createMathTransform(org.opengis.referencing.operation.MathTransformFactory factory, org.opengis.parameter.ParameterValueGroup parameters) throws org.opengis.util.FactoryException
      Creates an Equirectangular projection from the specified group of parameter values. This method is an adaptation of NormalizedProjection constructor, reproduced in this method because we will create an affine transform instead of the usual projection classes.
      Parameters:
      factory - the factory to use if this constructor needs to create other math transforms.
      parameters - the parameter values that define the transform to create.
      Returns:
      the map projection created from the given parameter values.
      Throws:
      org.opengis.util.FactoryException - if an error occurred while creating the math transform.