Package com.kheops.jmap.spatial
Class MultiLineString
java.lang.Object
com.kheops.jmap.spatial.DefaultGeometry
com.kheops.jmap.spatial.GeometryCollection
com.kheops.jmap.spatial.MultiCurve
com.kheops.jmap.spatial.MultiLineString
- All Implemented Interfaces:
Geometry,LineTypeGeometry,Serializable,Cloneable
This class represents a collection of LineString
A single LineString is allowed even if it's not the correct class.
A single LineString is allowed even if it's not the correct class.
- See Also:
-
Field Summary
Fields inherited from class com.kheops.jmap.spatial.GeometryCollection
bounds, geometriesFields 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 TypeMethodDescriptionclone()Clones this geometry.This method returns a point that is typically centered on the geometry.shortReturns the geometry class id.intReturns the geometry type for this geometry.booleanisClosed()doublelength()Returns the geometry length.Point[]Returns this geometry as an array of Point.voidsetCurves(LineString[] curves) voidsetGeometries(Geometry[] geometries) toString()Returns information about the current geometry.Methods inherited from class com.kheops.jmap.spatial.GeometryCollection
area, boundary, createBounds, equals, fit, geometryN, getBounds, getGeometries, getGeometryCount, hashCode, keepLineString, keepLineString, keepPoint, keepPoint, keepPolygon, keepPolygon, numGeometries, sizeOf, spatiallyEquals, transform, translate, validateMethods 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
area, asText, boundary, createBounds, getBounds, sizeOf, spatiallyEquals, spatiallyEquals, transform, translate
-
Constructor Details
-
MultiLineString
public MultiLineString() -
MultiLineString
-
-
Method Details
-
clone
Description copied from class:GeometryCollectionClones this geometry.- Specified by:
clonein interfaceGeometry- Specified by:
clonein classGeometryCollection- Returns:
- a deep copy of the current geometry.
-
serialize
Returns this geometry as an array of Point.- Specified by:
serializein interfaceGeometry- Overrides:
serializein classGeometryCollection- Returns:
- this geometry as an array of Point.
-
isClosed
public boolean isClosed()- Specified by:
isClosedin interfaceLineTypeGeometry- Specified by:
isClosedin classMultiCurve
-
length
public double length()Returns the geometry length. If the geometry is a surface, then the geometry perimeter shall be returned.- Specified by:
lengthin interfaceGeometry- Specified by:
lengthin classMultiCurve- Returns:
- the geometry length.
-
setGeometries
- Specified by:
setGeometriesin classGeometryCollection
-
getCurves
- Returns:
-
setCurves
- Parameters:
curves-
-
lineIterator
-
toString
Description copied from interface:GeometryReturns information about the current geometry. -
getGeometryId
public short getGeometryId()Returns the geometry class id. This method is useful for geometry serialization.- Returns:
- the geometry id.
-
getGeometryType
public int getGeometryType()Returns the geometry type for this geometry.- Returns:
- the geometry type.
- See Also:
-
getCenteredPoint
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.- Returns:
- a point likely at the center of the geometry
-