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, coords
Fields 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.short
Returns 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, translate
Methods inherited from class com.kheops.jmap.spatial.DefaultGeometry
asText, spatiallyEquals
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.kheops.jmap.spatial.Geometry
asText, spatiallyEquals
-
Constructor Details
-
Line
-
Line
-
-
Method Details
-
getGeometryId
public short getGeometryId()Description copied from class:LineString
Returns the geometry class id. This method is useful for geometry serialization.- Specified by:
getGeometryId
in interfaceGeometry
- Overrides:
getGeometryId
in 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:
pointOnLine
in classLineString
- Parameters:
interpolation
- the interpolation expressed as a percentage (between 0 and 1)- Returns:
- the reulsting point
-
getCenteredPoint
Description copied from class:LineString
This 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:
getCenteredPoint
in interfaceGeometry
- Overrides:
getCenteredPoint
in classLineString
- Returns:
- a point likely at the center of the geometry
-
toString
Description copied from interface:Geometry
Returns information about the current geometry.- Specified by:
toString
in interfaceGeometry
- Overrides:
toString
in classLineString
- Returns:
- information about the current geometry.
-