Package com.treasure.hunt.jts.geom
Class GeometryAngle
- java.lang.Object
-
- org.locationtech.jts.geom.Geometry
-
- org.locationtech.jts.geom.LineString
-
- com.treasure.hunt.jts.geom.GeometryAngle
-
- All Implemented Interfaces:
Shapeable,java.io.Serializable,java.lang.Cloneable,java.lang.Comparable,org.locationtech.jts.geom.Lineal
public class GeometryAngle extends org.locationtech.jts.geom.LineString implements Shapeable
The Angle is an geometric representation of an angle at a certain position. It is defined by 3Coordinate's ordered the named way in theGeometryUtility.coordinatesarray:- the right point,
- the center point and
- the left point.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GeometryAngle(org.locationtech.jts.geom.Coordinate right, org.locationtech.jts.geom.Coordinate center, org.locationtech.jts.geom.Coordinate left)GeometryAngle with standard geometry factory.GeometryAngle(org.locationtech.jts.geom.GeometryFactory factory, org.locationtech.jts.geom.Coordinate center, double start, double extend)GeometryAngle constructor via the centralCoordinate, the start angle and the angles extend.GeometryAngle(org.locationtech.jts.geom.GeometryFactory factory, org.locationtech.jts.geom.Coordinate right, org.locationtech.jts.geom.Coordinate center, org.locationtech.jts.geom.Coordinate left)GeometryAngle constructor via threeCoordinates.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GeometryAnglecopy()doubleextend()org.locationtech.jts.geom.CoordinategetCenter()java.lang.StringgetGeometryType()org.locationtech.jts.geom.CoordinategetLeft()doublegetNormalizedAngle()the Angle between the middle of the Hint and the x axis normalized to the range of [0 , 2*PI]org.locationtech.jts.geom.CoordinategetRight()booleaninView(org.locationtech.jts.geom.Coordinate coordinate)RayleftRay()org.locationtech.jts.math.Vector2DleftVector()doublerightAngle()RayrightRay()org.locationtech.jts.math.Vector2DrightVector()voidsetCenter(org.locationtech.jts.geom.Coordinate center)voidsetLeft(org.locationtech.jts.geom.Coordinate left)voidsetRight(org.locationtech.jts.geom.Coordinate right)java.awt.ShapetoShape(AdvancedShapeWriter shapeWriter)-
Methods inherited from class org.locationtech.jts.geom.LineString
apply, apply, apply, apply, clone, compareToSameClass, compareToSameClass, computeEnvelopeInternal, copyInternal, equalsExact, getBoundary, getBoundaryDimension, getCoordinate, getCoordinateN, getCoordinates, getCoordinateSequence, getDimension, getEndPoint, getLength, getNumPoints, getPointN, getSortIndex, getStartPoint, isClosed, isCoordinate, isEmpty, isEquivalentClass, isRing, normalize, reverse
-
Methods inherited from class org.locationtech.jts.geom.Geometry
buffer, buffer, buffer, checkNotGeometryCollection, compare, compareTo, compareTo, contains, convexHull, coveredBy, covers, crosses, difference, disjoint, distance, equal, equals, equals, equalsExact, equalsNorm, equalsTopo, geometryChanged, geometryChangedAction, getArea, getCentroid, getEnvelope, getEnvelopeInternal, getFactory, getGeometryN, getInteriorPoint, getNumGeometries, getPrecisionModel, getSRID, getUserData, hashCode, hasNonEmptyElements, hasNullElements, intersection, intersects, isGeometryCollection, isRectangle, isSimple, isValid, isWithinDistance, norm, overlaps, relate, relate, setSRID, setUserData, symDifference, toString, toText, touches, union, union, within
-
-
-
-
Constructor Detail
-
GeometryAngle
public GeometryAngle(org.locationtech.jts.geom.GeometryFactory factory, org.locationtech.jts.geom.Coordinate right, org.locationtech.jts.geom.Coordinate center, org.locationtech.jts.geom.Coordinate left)GeometryAngle constructor via threeCoordinates.- Parameters:
factory- The GeometryFactory suggested to create theAngleright- the right angles arm end pointcenter- the central point of the angleleft- the left angles arm end point
-
GeometryAngle
public GeometryAngle(org.locationtech.jts.geom.Coordinate right, org.locationtech.jts.geom.Coordinate center, org.locationtech.jts.geom.Coordinate left)GeometryAngle with standard geometry factory.- Parameters:
right- the right angles arm end pointcenter- the central point of the angleleft- the left angles arm end point
-
GeometryAngle
public GeometryAngle(org.locationtech.jts.geom.GeometryFactory factory, org.locationtech.jts.geom.Coordinate center, double start, double extend)GeometryAngle constructor via the centralCoordinate, the start angle and the angles extend.- Parameters:
factory- The GeometryFactory suggested to create theAnglecenter- the central point of the anglestart- starting angle relative to x-axisextend- angle extend
-
-
Method Detail
-
getNormalizedAngle
public double getNormalizedAngle()
the Angle between the middle of the Hint and the x axis normalized to the range of [0 , 2*PI]- Returns:
- the angle in radians
-
getCenter
public org.locationtech.jts.geom.Coordinate getCenter()
-
setCenter
public void setCenter(org.locationtech.jts.geom.Coordinate center)
-
getLeft
public org.locationtech.jts.geom.Coordinate getLeft()
-
setLeft
public void setLeft(org.locationtech.jts.geom.Coordinate left)
-
getRight
public org.locationtech.jts.geom.Coordinate getRight()
-
setRight
public void setRight(org.locationtech.jts.geom.Coordinate right)
-
rightVector
public org.locationtech.jts.math.Vector2D rightVector()
-
leftVector
public org.locationtech.jts.math.Vector2D leftVector()
-
leftRay
public Ray leftRay()
-
rightRay
public Ray rightRay()
-
rightAngle
public double rightAngle()
-
extend
public double extend()
-
toShape
public java.awt.Shape toShape(AdvancedShapeWriter shapeWriter)
-
getGeometryType
public java.lang.String getGeometryType()
- Overrides:
getGeometryTypein classorg.locationtech.jts.geom.LineString
-
inView
public boolean inView(org.locationtech.jts.geom.Coordinate coordinate)
-
copy
public GeometryAngle copy()
- Overrides:
copyin classorg.locationtech.jts.geom.Geometry
-
-