Class Legacy

java.lang.Object
org.apache.sis.internal.referencing.Legacy

public final class Legacy extends Object
Utilities related to version 1 of Well Known Text format. Defined in a separated classes for reducing classes loading when not necessary.

This class implements the AxisFilter interface for opportunistic reasons. Callers should ignore this implementation detail.

Since:
0.4
Version:
0.8
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final org.opengis.referencing.cs.CartesianCS
    A three-dimensional Cartesian CS with the legacy set of geocentric axes.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Do not allow instantiation of this class.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.opengis.referencing.cs.CartesianCS
    forGeocentricCRS(org.opengis.referencing.cs.CartesianCS cs, boolean toLegacy)
    Returns the axes to use instead of the ones in the given coordinate system.
    static org.opengis.referencing.cs.CartesianCS
    replaceUnit(org.opengis.referencing.cs.CartesianCS cs, javax.measure.Unit<?> unit)
    Returns the coordinate system of a geocentric CRS using axes in the given unit of measurement.
    static org.opengis.referencing.cs.CartesianCS
    standard(javax.measure.Unit<?> unit)
    The standard three-dimensional Cartesian CS as defined by ISO 19111.

    Methods inherited from class java.lang.Object

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

    • LEGACY

      private static final org.opengis.referencing.cs.CartesianCS LEGACY
      A three-dimensional Cartesian CS with the legacy set of geocentric axes. OGC 01-009 defines the default geocentric axes as: where the OTHER axis is toward prime meridian. Those directions and axis names are different than the ISO 19111's ones (ISO names are "Geocentric X", "Geocentric Y" and "Geocentric Z"). This constant uses the invalid names and directions for WKT 1 parsing/formatting purposes.
  • Constructor Details

    • Legacy

      private Legacy()
      Do not allow instantiation of this class.
  • Method Details

    • standard

      public static org.opengis.referencing.cs.CartesianCS standard(javax.measure.Unit<?> unit)
      The standard three-dimensional Cartesian CS as defined by ISO 19111.
      Parameters:
      unit - the linear unit of the desired coordinate system, or null for metres.
      Returns:
      the ISO 19111 coordinate system.
    • forGeocentricCRS

      public static org.opengis.referencing.cs.CartesianCS forGeocentricCRS(org.opengis.referencing.cs.CartesianCS cs, boolean toLegacy)
      Returns the axes to use instead of the ones in the given coordinate system. If the coordinate system axes should be used as-is, returns cs.
      Parameters:
      cs - the coordinate system for which to compare the axis directions.
      toLegacy - true for replacing ISO directions by the legacy ones, or false for the other way around.
      Returns:
      the axes to use instead of the ones in the given CS, or cs if the CS axes should be used as-is.
    • replaceUnit

      public static org.opengis.referencing.cs.CartesianCS replaceUnit(org.opengis.referencing.cs.CartesianCS cs, javax.measure.Unit<?> unit)
      Returns the coordinate system of a geocentric CRS using axes in the given unit of measurement. This method presumes that the given cs uses Units.METRE (this is not verified).
      Parameters:
      cs - the coordinate system for which to perform the unit replacement.
      unit - the unit of measurement for the geocentric CRS axes.
      Returns:
      the coordinate system for a geocentric CRS with axes using the given unit of measurement.
      Since:
      0.6