Region of interest (ROI) for an operation to apply on a coverage.
RegionOfInterestare immutable and thread-safe.
LimitationsCurrent implementation supports two-dimensional regions only. This restriction will be relaxed progressively in future versions.
Current implementation defines ROI using a geometric shape only. Future versions may allow other ways such as mask rasters.
- See Also:
Defined in the
Method SummaryModifier and TypeMethodDescription
final booleanCompares this region of interest with the given object for equality.
booleanCompares this region of interest with the given object for equality.
intReturns a hash code value for this region of interest.Returns the clip geometry in coordinates of grid cells.
RegionOfInterestCreates a new region of interest from a two-dimensional shape. If the given CRS is
null, then it will be assumed the same CRS than the CRS of the coverage on which operations are applied.
geometry- the ROI as a geometry. Coordinates are in the CRS given by
crs- coordinate reference system of the region of interest, or
toShape2DReturns the clip geometry in coordinates of grid cells. The target space is specified by a
LimitationsIn current implementation, the grid geometry most be two-dimensional. This restriction will be relaxed progressively in future versions.
target- two-dimensional grid geometry of the target image.
- clip in pixel coordinates of given grid.
TransformException- if ROI coordinates can not be transformed to grid coordinates.
equalspublic final boolean equals
(Object other)Compares this region of interest with the given object for equality.
equalsCompares this region of interest with the given object for equality.
- Specified by:
other- the other object to compare with this ROI.
mode- the comparison criterion.
- whether the given object is equal to this ROI?
- See Also:
hashCodepublic int hashCode()Returns a hash code value for this region of interest.