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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.opengis.referencing.cs.CartesianCS
A three-dimensional Cartesian CS with the legacy set of geocentric axes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
Field Details
-
LEGACY
private static final org.opengis.referencing.cs.CartesianCS LEGACYA three-dimensional Cartesian CS with the legacy set of geocentric axes. OGC 01-009 defines the default geocentric axes as: where theOTHER
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, ornull
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, returnscs
.- Parameters:
cs
- the coordinate system for which to compare the axis directions.toLegacy
-true
for replacing ISO directions by the legacy ones, orfalse
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 givencs
usesUnits.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
-