Package io.github.sebasbaumh.postgis
Class CircularString
java.lang.Object
io.github.sebasbaumh.postgis.Geometry
io.github.sebasbaumh.postgis.Curve
io.github.sebasbaumh.postgis.LineString
io.github.sebasbaumh.postgis.CircularString
- All Implemented Interfaces:
LineBasedGeometry
,Serializable
,Iterable<Point>
The CIRCULARSTRING is the basic curve type, similar to a LINESTRING in the linear world. A single segment required
three points, the start and end points (first and third) and any other point on the arc. The exception to this is for
a closed circle, where the start and end points are the same. In this case the second point MUST be the center of the
arc, ie the opposite side of the circle. To chain arcs together, the last point of the previous arc becomes the first
point of the next arc, just like in LINESTRING. This means that a valid circular string must have an odd number of
points greater than 1.
- Author:
- Sebastian Baumhekel
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The OGIS geometry type number for arcs/circles.Fields inherited from class io.github.sebasbaumh.postgis.Geometry
UNKNOWN_SRID
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an instance.CircularString
(Iterable<Point> points) Constructs an instance. -
Method Summary
Methods inherited from class io.github.sebasbaumh.postgis.LineString
add, addAll, checkConsistency, close, equals, getCoordinates, getEndPoint, getNumberOfCoordinates, getStartPoint, hashCode, hasMeasure, is3d, isEmpty, iterator, reverse
Methods inherited from class io.github.sebasbaumh.postgis.Curve
isClockwise, isClosed, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
TYPE
public static final int TYPEThe OGIS geometry type number for arcs/circles.- See Also:
-
-
Constructor Details
-
CircularString
public CircularString()Constructs an instance. -
CircularString
Constructs an instance.- Parameters:
points
- points
-
-
Method Details
-
length
public double length()Description copied from interface:LineBasedGeometry
Gets the length of this line.- Specified by:
length
in interfaceLineBasedGeometry
- Overrides:
length
in classLineString
- Returns:
- length
-