Class LinearTransformBuilder.Ungridded
java.lang.Object
org.apache.sis.internal.util.AbstractMap<org.opengis.geometry.DirectPosition,org.opengis.geometry.DirectPosition>
org.apache.sis.referencing.operation.builder.LinearTransformBuilder.ControlPoints
org.apache.sis.referencing.operation.builder.LinearTransformBuilder.Ungridded
- All Implemented Interfaces:
Map<org.opengis.geometry.DirectPosition,org.opengis.geometry.DirectPosition>
- Enclosing class:
- LinearTransformBuilder
Implementation of the map returned by
LinearTransformBuilder.getControlPoints() when no grid is used.
This implementation is simpler than the gridded case, but less efficient as some methods
require a linear scan.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.internal.util.AbstractMap
AbstractMap.EntryIterator<K,V>, AbstractMap.IteratorAdapter<K, V>, AbstractMap.KeyIterator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) intdomain()Returns the number of points to consider when searching inLinearTransformBuilder.sourcesorLinearTransformBuilder.targetsarrays.protected AbstractMap.EntryIterator<org.opengis.geometry.DirectPosition,org.opengis.geometry.DirectPosition> Returns an iterator over the entries.(package private) intflatIndex(org.opengis.geometry.DirectPosition source) Returns the index where to fetch a target position for the given source position in the flattened array.booleanisEmpty()Overrides default method with more efficient implementation.intsize()Returns the number of key-value mappings in this map.Methods inherited from class org.apache.sis.referencing.operation.builder.LinearTransformBuilder.ControlPoints
containsKey, containsValue, get, position, searchMethods inherited from class org.apache.sis.internal.util.AbstractMap
addKey, addValue, clear, entrySet, equals, getOrDefault, hashCode, keySet, put, putAll, remove, toString, valuesMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
Ungridded
private Ungridded()
-
-
Method Details
-
isEmpty
public boolean isEmpty()Overrides default method with more efficient implementation.- Specified by:
isEmptyin interfaceMap<org.opengis.geometry.DirectPosition,org.opengis.geometry.DirectPosition> - Overrides:
isEmptyin classAbstractMap<org.opengis.geometry.DirectPosition,org.opengis.geometry.DirectPosition> - Returns:
trueif this map contains no element.
-
size
public int size()Description copied from class:AbstractMapReturns the number of key-value mappings in this map. The default implementation count the number of values returned byAbstractMap.entryIterator(). Subclasses should implement a more efficient method.- Specified by:
sizein interfaceMap<org.opengis.geometry.DirectPosition,org.opengis.geometry.DirectPosition> - Overrides:
sizein classAbstractMap<org.opengis.geometry.DirectPosition,org.opengis.geometry.DirectPosition>
-
domain
int domain()Description copied from class:LinearTransformBuilder.ControlPointsReturns the number of points to consider when searching inLinearTransformBuilder.sourcesorLinearTransformBuilder.targetsarrays. For gridded data we cannot rely onLinearTransformBuilder.numPointsbecause the coordinate values may be at any index, not necessarily at consecutive indices.- Overrides:
domainin classLinearTransformBuilder.ControlPoints
-
flatIndex
int flatIndex(org.opengis.geometry.DirectPosition source) Returns the index where to fetch a target position for the given source position in the flattened array. In non-gridded case, this operation requires linear scan.- Overrides:
flatIndexin classLinearTransformBuilder.ControlPoints- See Also:
-
entryIterator
protected AbstractMap.EntryIterator<org.opengis.geometry.DirectPosition,org.opengis.geometry.DirectPosition> entryIterator()Returns an iterator over the entries.DirectPositioninstances are created on-the-fly during the iteration.- Overrides:
entryIteratorin classLinearTransformBuilder.ControlPoints- Returns:
- an iterator over the entries in this map, or
null.
-