Package org.apache.sis.internal.storage
Class TiledGridCoverage.AOI
java.lang.Object
org.apache.sis.internal.storage.TiledGridCoverage.AOI
- Enclosing class:
TiledGridCoverage
The Area Of Interest specified by user in a call to
TiledGridCoverage.render(GridExtent).
This class is also an iterator over tiles in the region of interest.-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intTotal number of tiles in the AOI, fromtileLowerinclusive totileUpperexclusive. -
Method Summary
Modifier and TypeMethodDescriptionReturns the cached tile for current iterator position.final intReturns the current iterator position as an index in the array of tiles to be returned byTiledGridCoverage.readTiles(AOI).booleannext()Moves the iterator position to next tile.subset(int[] tileLower, int[] tileUpper) Returns a newAOIinstance over a sub-region of this Area Of Interest.
-
Field Details
-
tileCountInQuery
public final int tileCountInQueryTotal number of tiles in the AOI, fromtileLowerinclusive totileUpperexclusive. This is the length of the array to be returned byTiledGridCoverage.readTiles(AOI).
-
-
Method Details
-
subset
Returns a newAOIinstance over a sub-region of this Area Of Interest. The region is specified by tile indices, with (0,0) being the first tile of the enclosing grid coverage. The given region is intersected with the region of thisAOI. ThetileLowerandtileUpperarray can have any length; extra indices are ignored and missing indices are inherited from this AOI. This method is independent to the iterator position of thisAOI.- Parameters:
tileLower- indices (relative to enclosingTiledGridCoverage) of the upper-left tile to read.tileUpper- indices (relative to enclosingTiledGridCoverage) after the bottom-right tile to read.- Returns:
- a new
AOIinstance for the specified sub-region.
-
getIndexInResultArray
public final int getIndexInResultArray()Returns the current iterator position as an index in the array of tiles to be returned byTiledGridCoverage.readTiles(AOI). The initial position is zero. The position is incremented by 1 in each call tonext().- Returns:
- current iterator position in result array.
-
getCachedTile
Returns the cached tile for current iterator position.- Returns:
- cached tile at current iterator position, or
nullif none. - See Also:
-
next
public boolean next()Moves the iterator position to next tile. This method should be invoked in a loop as below:- Returns:
trueon success, orfalseif the iteration is finished.
-