org.cts.op
Class CoordinateSwitch
java.lang.Object
org.cts.IdentifiableComponent
org.cts.op.AbstractCoordinateOperation
org.cts.op.CoordinateSwitch
- All Implemented Interfaces:
- Identifiable, CoordinateOperation
public class CoordinateSwitch
- extends AbstractCoordinateOperation
A class to switch to values in a double array.
- Author:
- Michaƫl Michaud
|
Constructor Summary |
CoordinateSwitch(int pos1,
int pos2)
Creates a new operation to switch coord pos1 and coord pos2. |
| Methods inherited from class org.cts.IdentifiableComponent |
addAlias, addRemark, equals, getAliases, getAuthorityKey, getAuthorityName, getCode, getComponent, getIdentifier, getName, getRemarks, getShortName, hashCode, setIdentifier, setRemarks, setShortName, toString |
| Methods inherited from interface org.cts.Identifiable |
addAlias, addRemark, getAliases, getAuthorityKey, getAuthorityName, getCode, getName, getRemarks, getShortName, setRemarks, setShortName |
SWITCH_LAT_LON
public static final CoordinateSwitch SWITCH_LAT_LON
- Switch the two first value of a coordinate. For instance longitude and
latitude in the case of geographic coordinates.
CoordinateSwitch
public CoordinateSwitch(int pos1,
int pos2)
- Creates a new operation to switch coord pos1 and coord pos2.
- Parameters:
pos1 - position of the ordinate to switch to pos2pos2 - position of the ordinate to switch to pos1
transform
public double[] transform(double[] coord)
throws IllegalCoordinateException
- Change ordinate at pos1 with ordinate at pos2.
- Specified by:
transform in interface CoordinateOperation- Specified by:
transform in class AbstractCoordinateOperation
- Parameters:
coord - is an array containing one, two or three ordinates
- Returns:
- a double array containing the output coordinate
- Throws:
IllegalCoordinateException - if coord is not
compatible with this CoordinateOperation.
inverse
public CoordinateOperation inverse()
throws NonInvertibleOperationException
- Creates the inverse CoordinateOperation.
- Specified by:
inverse in interface CoordinateOperation- Overrides:
inverse in class AbstractCoordinateOperation
- Throws:
NonInvertibleOperationException
Copyright © 2014 IRSTV CNRS-FR-2488. All Rights Reserved.