Package io.github.sebasbaumh.postgis
Class Curve
java.lang.Object
io.github.sebasbaumh.postgis.Geometry
io.github.sebasbaumh.postgis.Curve
- All Implemented Interfaces:
LineBasedGeometry
,Serializable
- Direct Known Subclasses:
CompoundCurve
,LineString
Base class for simple curves like
LineString
s and complex classes like CompoundCurve
s.- Author:
- Sebastian Baumhekel
- See Also:
-
Field Summary
Fields inherited from class io.github.sebasbaumh.postgis.Geometry
UNKNOWN_SRID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
close()
Closes thisCurve
if the last coordinate is not already the same as the first coordinate.boolean
Checks if this ring is oriented in clockwise direction.boolean
isClosed()
Checks if this line is closed, so the last coordinate is the same as the first coordinate.abstract void
reverse()
Reverses this linestring.toString()
Methods inherited from class io.github.sebasbaumh.postgis.Geometry
checkConsistency, equals, getCoordinates, getNumberOfCoordinates, getSrid, getType, hashCode, hasMeasure, is3d, isEmpty, setSrid
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.github.sebasbaumh.postgis.LineBasedGeometry
getEndPoint, getStartPoint, length
-
Constructor Details
-
Curve
protected Curve(int type) Constructor for subclasses.- Parameters:
type
- has to be given by all subclasses
-
-
Method Details
-
close
public abstract void close()Closes thisCurve
if the last coordinate is not already the same as the first coordinate. -
isClockwise
public boolean isClockwise()Checks if this ring is oriented in clockwise direction.- Returns:
- true on success, else false
-
isClosed
public boolean isClosed()Description copied from interface:LineBasedGeometry
Checks if this line is closed, so the last coordinate is the same as the first coordinate.- Specified by:
isClosed
in interfaceLineBasedGeometry
- Returns:
- true on success, else false
-
reverse
public abstract void reverse()Reverses this linestring. -
toString
-