public class CoordinateConverter extends Object implements android.os.Parcelable
| Modifier and Type | Field and Description |
|---|---|
static android.os.Parcelable.Creator<CoordinateConverter> |
CREATOR |
| Constructor and Description |
|---|
CoordinateConverter(Dimensions dimensions,
Coordinate center)
Define how cartesian area is placed in geographical space, aligned with east-west and north-south axis.
|
CoordinateConverter(Dimensions dimensions,
Coordinate center,
Angle rotation)
Define how the cartesian area is placed in geographical space, with a rotation with respect to east-west axis.
|
| Modifier and Type | Method and Description |
|---|---|
int |
describeContents() |
boolean |
equals(Object o) |
int |
hashCode() |
Angle |
toAngle(Angle yaw)
Converts and angle from building system coordinate to Earth system coordinate.
|
CartesianCoordinate |
toCartesianCoordinate(Coordinate coordinate)
Transform geographical coordinates to cartesian coordinates (within the area defined in the constructor)
|
Coordinate |
toCoordinate(CartesianCoordinate fromCartesianCoordinate)
Transform cartesian coordinates (within the area defined in the constructor) into geographical coordinates
|
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final android.os.Parcelable.Creator<CoordinateConverter> CREATOR
public CoordinateConverter(Dimensions dimensions, Coordinate center)
dimensions - Not null. Dimensions of cartesian area, in meters. E.g. Building.getDimensions()center - Not null. Geographical coordinates of middle point of cartesian area. E.g. Building.getCenter()public CoordinateConverter(Dimensions dimensions, Coordinate center, Angle rotation)
dimensions - Not null. Dimensions of cartesian area, in meters. E.g. Building.getDimensions()center - Not null. Geographical coordinates of middle point of cartesian area. E.g. Building.getCenter()rotation - Not null. Rotation angle of the cartesian area, around the center point. E.g. Building.getRotation()IllegalArgumentException - if some provided parameter is null.public Angle toAngle(Angle yaw)
yaw - the angle to convertpublic CartesianCoordinate toCartesianCoordinate(Coordinate coordinate)
coordinate - Not null.public Coordinate toCoordinate(CartesianCoordinate fromCartesianCoordinate)
fromCartesianCoordinate - Not null.public int describeContents()
describeContents in interface android.os.Parcelablepublic void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel in interface android.os.Parcelable