Class FlatShape
java.lang.Object
org.apache.sis.internal.feature.AbstractGeometry
org.apache.sis.internal.feature.j2d.FlatShape
- All Implemented Interfaces:
Shape
A shape made of straight lines. This shape does not contain any Bézier curve.
Consequently, the flatness factor of path iterator can be ignored.
- Since:
- 1.1
- Version:
- 1.1
- Author:
- Martin Desruisseaux (Geomatys)
-
Method Summary
Modifier and TypeMethodDescriptionfinal booleanTests if the specified point is inside the boundary of the shape.fastClip(Rectangle2D areaOfInterest) Returns a potentially smaller shape containing all polylines that intersect the given area of interest.final RectangleReturns an integer rectangle that completely encloses the shape.final Rectangle2DReturns a rectangle that completely encloses the shape.final PathIteratorgetPathIterator(AffineTransform at, double flatness) Returns an iterator for the shape outline geometry.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.awt.Shape
contains, contains, contains, getPathIterator, intersects, intersects
-
Method Details
-
getBounds
Returns an integer rectangle that completely encloses the shape. There is no guarantee that the rectangle is the smallest bounding box that encloses the shape. -
getBounds2D
Returns a rectangle that completely encloses the shape. There is no guarantee that the rectangle is the smallest bounding box that encloses the shape.- Specified by:
getBounds2Din interfaceShape
-
contains
Tests if the specified point is inside the boundary of the shape. This method delegates toShape.contains(double, double). -
getPathIterator
Returns an iterator for the shape outline geometry. The flatness factor is ignored on the assumption that this shape does not contain any Bézier curve, as stipulated inFlatShapeclass contract.- Specified by:
getPathIteratorin interfaceShape- Parameters:
at- an optional transform to apply on coordinate values.flatness- ignored.- Returns:
- an iterator for the shape outline geometry.
-
fastClip
Returns a potentially smaller shape containing all polylines that intersect the given area of interest. This method performs only a quick check based on bounds intersections. It does not test individual points. The returned shape may still have many points outside the given bounds.- Parameters:
areaOfInterest- the area of interest. Edges are considered exclusive.- Returns:
- a potentially smaller shape, or
nullif this shape is fully outside the AOI.
-