net.surveyos.sourceforge.jtswarped.angles
Interface SurveyorsDirection

All Known Implementing Classes:
BasicSurveyorsDirection

public interface SurveyorsDirection

Represents a measurement of direction. This could be an azimuth or a bearing. Each line segment has both a direction and a length, or distance. Directions can be combined with distances to represent a vector in coordinate geometry. Angles can be calculated between directions, and a new direction can be calculated by adding or subtracting an angle from another direction. Directions are key to mapping angles, which are simply measures of revolution, to a fixed cartesian (2D grid) coordinate system.


Nested Class Summary
static class SurveyorsDirection.Quadrant
          Defines a set of quadrants to which a direction can belong.
 
Method Summary
 void flop180Degrees()
          Flops this direction 180 degrees.
 SurveyorsDirection.Quadrant getQuadrant()
          Returns the quadrant in which this direction lies.
 SurveyorsAngle getValue()
          Returns the value of this direction as a SurveyorsAngle.
 void rotate(BasicSurveyorsAngle argAngle, boolean argRotationDirection)
          Rotates this direction by the amount specified in the first angle.
 void rotateBackward90Degrees()
          Rotates this bearing backward (counterclockwise) 90 degrees.
 void rotateForward90Degrees()
          Rotates this bearing forward (clockwise) 90 degrees.
 

Method Detail

getValue

SurveyorsAngle getValue()
Returns the value of this direction as a SurveyorsAngle. This value represents the revolution turned from the zero direction (typically 'north") to this direction. In JTS Warped the zero direction is always due north or along the Y (or northing) axis of the cartesian (2D grid) coordinate system.


getQuadrant

SurveyorsDirection.Quadrant getQuadrant()
Returns the quadrant in which this direction lies.


flop180Degrees

void flop180Degrees()
Flops this direction 180 degrees.


rotateForward90Degrees

void rotateForward90Degrees()
Rotates this bearing forward (clockwise) 90 degrees. This is useful for creating perpendicular directions.


rotateBackward90Degrees

void rotateBackward90Degrees()
Rotates this bearing backward (counterclockwise) 90 degrees. This is useful for creating perpendicular directions.


rotate

void rotate(BasicSurveyorsAngle argAngle,
            boolean argRotationDirection)
Rotates this direction by the amount specified in the first angle. If the boolean argument is true, the bearing is rotated in a clockwise direction. If the boolean argument is false, the bearing is rotated in a counter clockwise direction.