|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cts.IdentifiableComponent
org.cts.op.AbstractCoordinateOperation
org.cts.op.CoordinateRounding
public class CoordinateRounding
A class to change the coordinate precision
| Field Summary | |
|---|---|
static CoordinateRounding |
CENTIMETER
Round the coordinates to centimeter value. |
static CoordinateRounding |
DECIMETER
Round the coordinates to decimeter value. |
static CoordinateRounding |
KILOMETER
Round the coordinates to kilometer value. |
static CoordinateRounding |
METER
Round the coordinates to meter value. |
static CoordinateRounding |
MILLIMETER
Round the coordinates to millimeter value. |
| Fields inherited from class org.cts.op.AbstractCoordinateOperation |
|---|
precision |
| Fields inherited from interface org.cts.Identifiable |
|---|
DEFAULT, LOCAL, UNKNOWN |
| Method Summary | |
|---|---|
static CoordinateRounding |
createCoordinateRoundingOperation(double resolution)
Creates a coordinate rounding operation from the smallest representable value. |
static CoordinateRounding |
createCoordinateRoundingOperationFromDecimalPlaces(int decimalPlaces)
Creates a coordinate rounding operation from a decimal place number. |
double[] |
transform(double[] coord)
Returns a coordinate representing the same point as coord but with coordinates rounded as specified. |
| Methods inherited from class org.cts.op.AbstractCoordinateOperation |
|---|
getPrecision, inverse |
| 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 class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.cts.Identifiable |
|---|
addAlias, addRemark, getAliases, getAuthorityKey, getAuthorityName, getCode, getName, getRemarks, getShortName, setRemarks, setShortName |
| Field Detail |
|---|
public static final CoordinateRounding MILLIMETER
public static final CoordinateRounding CENTIMETER
public static final CoordinateRounding DECIMETER
public static final CoordinateRounding METER
public static final CoordinateRounding KILOMETER
| Method Detail |
|---|
public double[] transform(double[] coord)
throws IllegalCoordinateException
transform in interface CoordinateOperationtransform in class AbstractCoordinateOperationcoord - is an array containing one, two or three ordinates
IllegalCoordinateException - if coord is not
compatible with this CoordinateOperation.public static CoordinateRounding createCoordinateRoundingOperationFromDecimalPlaces(int decimalPlaces)
decimalPlaces - number of decimal placespublic static CoordinateRounding createCoordinateRoundingOperation(double resolution)
resolution - smallest representable value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||