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
Author:
Martin Desruisseaux (Geomatys)
  • 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
  • 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