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(CoordinateSystemAxis axis,
AxisDirection direction)
Returns a replacement for the given axis direction.
|
Unit<?> |
getUnitReplacement(CoordinateSystemAxis axis,
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(CoordinateSystemAxis axis, AxisDirection direction)
@Override public getDirectionReplacement(CoordinateSystemAxis axis, AxisDirection direction) { if (direction == AxisDirection.DOWN) { direction = AxisDirection.UP; } return direction; }
axis
- the axis for which to change axis direction, if desired.direction
- the original axis direction.direction
if there is no change.Unit<?> getUnitReplacement(CoordinateSystemAxis axis, Unit<?> unit)
@Override public Unit<?> getUnitReplacement(CoordinateSystemAxis axis, Unit<?> unit) { if (Units.isAngular(unit)) { unit = Units.DEGREE; } return unit; }
axis
- the axis for which to change unit, if desired.unit
- the original axis unit.unit
if there is no change.Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.