Class Legacy
java.lang.Object
org.apache.sis.internal.referencing.Legacy
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 TypeMethodDescriptionstatic org.opengis.referencing.cs.CartesianCSforGeocentricCRS(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.CartesianCSreplaceUnit(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.CartesianCSstandard(javax.measure.Unit<?> unit) The standard three-dimensional Cartesian CS as defined by ISO 19111.
-
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, ornullfor 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, returnscs.- Parameters:
cs- the coordinate system for which to compare the axis directions.toLegacy-truefor replacing ISO directions by the legacy ones, orfalsefor the other way around.- Returns:
- the axes to use instead of the ones in the given CS,
or
csif 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 givencsusesUnits.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
-