Package com.kheops.jmap.spatial
Class Annotation
java.lang.Object
com.kheops.jmap.spatial.DefaultGeometry
com.kheops.jmap.spatial.Polygon
com.kheops.jmap.spatial.OrientedRectangle
com.kheops.jmap.spatial.Annotation
- All Implemented Interfaces:
AnnotationTypeGeometry,Geometry,PolygonTypeGeometry,Surface,Serializable,Cloneable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.kheops.jmap.spatial.OrientedRectangle
OrientedRectangle.Double, OrientedRectangle.Float -
Field Summary
FieldsFields 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 the current polygon object.doublegetAngle()shortReturns the geometry class id.intReturns the geometry type for this geometry.doublefinal StringgetText()doublegetWidth()voidvoidsetHeight(double height) final voidvoidsetWidth(double width) intsizeOf()Returns an approximation in bytes of the memory used by this geometry.toString()Returns information about the current geometry.Methods inherited from class com.kheops.jmap.spatial.OrientedRectangle
add, add, centroid, contains, contains, createBounds, getCoord0, getCoord1, getCoord2, getCoord3, getCoord4, inflate, intersects, intersects, intersects, intersects, serialize, setCoord0, setCoord1, setCoord2, setCoord3, setCoord4, transformMethods inherited from class com.kheops.jmap.spatial.Polygon
area, asText, boundary, equals, exteriorRing, getBounds, getCenteredPoint, getRings, hasHoles, interiorRingN, length, numInteriorRing, pointOnSurface, polygonIterator, setRings, spatiallyEquals, translate, validateMethods inherited from class com.kheops.jmap.spatial.DefaultGeometry
spatiallyEqualsMethods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.kheops.jmap.spatial.Geometry
asText, boundary, createBounds, getBounds, getCenteredPoint, length, serialize, spatiallyEquals, spatiallyEquals, transform, translate
-
Field Details
-
width
protected double width -
height
protected double height
-
-
Constructor Details
-
Annotation
public Annotation(String text, Point lowerLeft, Point upperLeft, Point upperRight, Point lowerRight) Constructs a new Annotation instance defined by the 4 specified coordinates. The coordinates represent the rectangular region of the annotation. The coordinate point0 is the lower left corner (when not oriented) and the others are ordered clockwise. No verification is made to ensure that the 4 points represent a rectangle. The rectangle region can be oriented.- Parameters:
lowerLeft- lower left cornerupperLeft- upper left cornerupperRight- upper right cornerlowerRight- lower right corner
-
-
Method Details
-
getAngle
public double getAngle() -
getHeight
public double getHeight()- Specified by:
getHeightin classOrientedRectangle
-
getWidth
public double getWidth()- Specified by:
getWidthin classOrientedRectangle
-
setHeight
public void setHeight(double height) - Specified by:
setHeightin classOrientedRectangle
-
setWidth
public void setWidth(double width) - Specified by:
setWidthin classOrientedRectangle
-
getText
-
setText
-
setBounds
- Specified by:
setBoundsin classOrientedRectangle
-
clone
Description copied from class:PolygonClones the current polygon object. -
getGeometryType
public int getGeometryType()Description copied from interface:GeometryReturns the geometry type for this geometry.- Specified by:
getGeometryTypein interfaceGeometry- Overrides:
getGeometryTypein classPolygon- Returns:
- the geometry type.
- See Also:
-
getGeometryId
public short getGeometryId()Description copied from interface:GeometryReturns the geometry class id. This method is useful for geometry serialization.- Specified by:
getGeometryIdin interfaceGeometry- Overrides:
getGeometryIdin classPolygon- Returns:
- the geometry id.
-
annotationIterator
- Specified by:
annotationIteratorin interfaceAnnotationTypeGeometry
-
toString
Description copied from interface:GeometryReturns information about the current geometry. -
sizeOf
public int sizeOf()Returns an approximation in bytes of the memory used by this geometry.
-