Package com.kheops.jmap.spatial
Class LinearRing
java.lang.Object
com.kheops.jmap.spatial.DefaultGeometry
com.kheops.jmap.spatial.LineString
com.kheops.jmap.spatial.LinearRing
- All Implemented Interfaces:
Curve,Geometry,LineTypeGeometry,Serializable,Cloneable
This class represents a closed LineString. The first and last point are equal.
- 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 TypeMethodDescriptionclone()Clones this geometry.shortReturns the geometry class id.booleanisRing()always truebooleanisValid()Tests if the ring is valid.voidbooleanspatiallyEquals(Geometry o, PrecisionModel precisionModel) Tests if this geometry is equal to the argument, on a topological point of view.booleanspatiallyEquals(LinearRing ring) Tests if this geometry is equal to the argument, on a topological point of view
it means that they represents the same geometry, even if it is described differently (orientation of the rings, order of the rings)
it does not remove additional points on lineString (3 points aligned), one must use smoother.removeExtraPoints() before in order to achieve that.booleanspatiallyEquals(LinearRing ring, PrecisionModel precisionModel) Tests if this geometry is equal to the argument, on a topological point of view
it means that they represents the same geometry, even if it is described differently (orientation of the rings, order of the rings)
it does not remove additional points on lineString (3 points aligned), one must use smoother.removeExtraPoints() before in order to achieve that.toString()Returns information about the current geometry.Methods inherited from class com.kheops.jmap.spatial.LineString
area, boundary, createBounds, endPoint, equals, getBounds, getCenteredPoint, getCoords, getGeometryType, hashCode, isClosed, length, lineIterator, numPoints, pointN, pointOnLine, serialize, sizeOf, 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
-
LinearRing
public LinearRing() -
LinearRing
-
LinearRing
public LinearRing(double[] tab)
-
-
Method Details
-
setCoords
- Overrides:
setCoordsin classLineString
-
isRing
public boolean isRing()always true- Specified by:
isRingin interfaceCurve- Overrides:
isRingin classLineString- Returns:
-
toString
Description copied from interface:GeometryReturns information about the current geometry.- Specified by:
toStringin interfaceGeometry- Overrides:
toStringin classLineString- Returns:
- information about the current geometry.
-
clone
Clones this geometry. -
spatiallyEquals
Description copied from class:LineStringTests if this geometry is equal to the argument, on a topological point of view.- Specified by:
spatiallyEqualsin interfaceGeometry- Overrides:
spatiallyEqualsin classLineString- Parameters:
o- the geometry to be tested.precisionModel- the precision model to use while comparing geometries.- Returns:
- whether both geometries are spatially equals.
-
spatiallyEquals
Tests if this geometry is equal to the argument, on a topological point of view
it means that they represents the same geometry, even if it is described differently (orientation of the rings, order of the rings)
it does not remove additional points on lineString (3 points aligned), one must use smoother.removeExtraPoints() before in order to achieve that. here we first try to find a common point, then test equality in both orientation, -
spatiallyEquals
Tests if this geometry is equal to the argument, on a topological point of view
it means that they represents the same geometry, even if it is described differently (orientation of the rings, order of the rings)
it does not remove additional points on lineString (3 points aligned), one must use smoother.removeExtraPoints() before in order to achieve that. here we first try to find a common point, then test equality in both orientation,- Parameters:
ring-
-
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.
-
isValid
public boolean isValid()Tests if the ring is valid. To be valid : Must have 0 or at least 3 coordinates, and first and last coordinate must be equal.- Returns:
- true if valid
-