Package com.kheops.jmap.spatial
Class Line
java.lang.Object
com.kheops.jmap.spatial.DefaultGeometry
com.kheops.jmap.spatial.LineString
com.kheops.jmap.spatial.Line
- All Implemented Interfaces:
Curve,Geometry,LineTypeGeometry,Serializable,Cloneable
A
line is a LineString with 2 points.- See Also:
-
Field Summary
Fields inherited from class com.kheops.jmap.spatial.LineString
bounds, coordsFields inherited from interface com.kheops.jmap.spatial.Geometry
GEOMETRY_ANNOTATION, GEOMETRY_COMPLEX, GEOMETRY_ELLIPSE, GEOMETRY_LINE, GEOMETRY_LINEAR_RING, GEOMETRY_LINESTRING, GEOMETRY_MULTI_ANNOTATION, GEOMETRY_MULTI_LINESTRING, GEOMETRY_MULTI_POINT, GEOMETRY_MULTI_POLYGON, GEOMETRY_POINT, GEOMETRY_POLYGON, GEOMETRY_RECTANGLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis method returns a point that is typically centered on the geometry.shortReturns the geometry class id.pointOnLine(double interpolation) This method finds the point being at a certain percentage of the path between the starting point and the final point.toString()Returns information about the current geometry.Methods inherited from class com.kheops.jmap.spatial.LineString
area, boundary, clone, createBounds, endPoint, equals, getBounds, getCoords, getGeometryType, hashCode, isClosed, isRing, length, lineIterator, numPoints, pointN, serialize, setCoords, sizeOf, spatiallyEquals, spatiallyEquals, startPoint, transform, translateMethods inherited from class com.kheops.jmap.spatial.DefaultGeometry
asText, spatiallyEqualsMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.kheops.jmap.spatial.Geometry
asText, spatiallyEquals
-
Constructor Details
-
Line
-
Line
-
-
Method Details
-
getGeometryId
public short getGeometryId()Description copied from class:LineStringReturns the geometry class id. This method is useful for geometry serialization.- Specified by:
getGeometryIdin interfaceGeometry- Overrides:
getGeometryIdin classLineString- Returns:
- the geometry id.
-
pointOnLine
This method finds the point being at a certain percentage of the path between the starting point and the final point.- Overrides:
pointOnLinein classLineString- Parameters:
interpolation- the interpolation expressed as a percentage (between 0 and 1)- Returns:
- the reulsting point
-
getCenteredPoint
Description copied from class:LineStringThis method returns a point that is typically centered on the geometry. If the geometry is a point, the point is returned. If it is a line, a point on the curve interpolated at 50% is returned. If the geometry is a surface, the centroid is returned if it is inside the polygon, if not, a point inside the polygon (but likely not exactly in the center) will be returned. If the geometry is a collection, the method is called on the first part of the collection.- Specified by:
getCenteredPointin interfaceGeometry- Overrides:
getCenteredPointin classLineString- Returns:
- a point likely at the center of the geometry
-
toString
Description copied from interface:GeometryReturns information about the current geometry.- Specified by:
toStringin interfaceGeometry- Overrides:
toStringin classLineString- Returns:
- information about the current geometry.
-