public interface AxisFilter
AxisFilter can specify the axes to exclude in the new coordinate system, or specify different
units and directions associated to the axes.
Note that filtering one or more axes may result in a change of coordinate system type. For example excluding the z axis of a cylindrical coordinate system results in a polar coordinate system.
AxesConvention.CoordinateSystems.replaceAxes(CoordinateSystem, AxisFilter)Defined in the sis-referencing module
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(CoordinateSystemAxis axis)
Returns
true if the given axis shall be included in the new coordinate system. |
AxisDirection |
getDirectionReplacement(AxisDirection direction)
Returns a replacement for the given axis direction.
|
Unit<?> |
getUnitReplacement(Unit<?> unit)
Returns a replacement for the given axis unit.
|
boolean accept(CoordinateSystemAxis axis)
true if the given axis shall be included in the new coordinate system.axis - The axis to test.true if the given axis shall be included in the new coordinate system.AxisDirection getDirectionReplacement(AxisDirection direction)
@Override
public getDirectionReplacement(AxisDirection direction) {
if (direction == AxisDirection.DOWN) {
direction = AxisDirection.UP;
}
return direction;
}
direction - The original axis direction.direction if there is no change.Unit<?> getUnitReplacement(Unit<?> unit)
@Override
public Unit<?> getUnitReplacement(Unit<?> unit) {
if (Units.isAngular(unit)) {
unit = NonSI.DEGREE_ANGLE;
}
return unit;
}
unit - The original axis unit.unit if there is no change.Copyright © 2010–2015 The Apache Software Foundation. All rights reserved.