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, 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 TypeMethodDescriptionclone()
Clones this geometry.short
Returns the geometry class id.boolean
isRing()
always trueboolean
isValid()
Tests if the ring is valid.void
boolean
spatiallyEquals
(Geometry o, PrecisionModel precisionModel) Tests if this geometry is equal to the argument, on a topological point of view.boolean
spatiallyEquals
(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.boolean
spatiallyEquals
(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, 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
-
LinearRing
public LinearRing() -
LinearRing
-
LinearRing
public LinearRing(double[] tab)
-
-
Method Details
-
setCoords
- Overrides:
setCoords
in classLineString
-
isRing
public boolean isRing()always true- Specified by:
isRing
in interfaceCurve
- Overrides:
isRing
in classLineString
- Returns:
-
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.
-
clone
Clones this geometry. -
spatiallyEquals
Description copied from class:LineString
Tests if this geometry is equal to the argument, on a topological point of view.- Specified by:
spatiallyEquals
in interfaceGeometry
- Overrides:
spatiallyEquals
in 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: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.
-
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
-