Class 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 Details

    • serialVersionUID

      private static final long serialVersionUID
      Serial 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

      public Class<? extends org.opengis.referencing.operation.Projection> getInterface()
      Returns the GeoAPI interface implemented by this class. The default implementation returns Projection.class. Subclasses implementing a more specific GeoAPI interface shall override this method.
      Overrides:
      getInterface in class DefaultConversion
      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 or null.
      Specified by:
      getSourceCRS in interface org.opengis.referencing.operation.Conversion
      Specified by:
      getSourceCRS in interface org.opengis.referencing.operation.CoordinateOperation
      Overrides:
      getSourceCRS in class AbstractCoordinateOperation
      Returns:
      the source CRS, or null if not available.
    • getTargetCRS

      public final org.opengis.referencing.crs.ProjectedCRS getTargetCRS()
      Returns the target CRS, which must be projected or null.
      Specified by:
      getTargetCRS in interface org.opengis.referencing.operation.Conversion
      Specified by:
      getTargetCRS in interface org.opengis.referencing.operation.CoordinateOperation
      Overrides:
      getTargetCRS in class AbstractCoordinateOperation
      Returns:
      the target CRS, or null if not available.