Package ucar.nc2.grib.coord
Class CoordinateSharer<T>
- java.lang.Object
-
- ucar.nc2.grib.coord.CoordinateSharer<T>
-
public class CoordinateSharer<T> extends Object
Create shared coordinate variables across the variables in the same group. Use Coordinate.equals(), hashCode() to find unique coordinate variables. (so not merging similar) Used by GribCollectionBuilder and GribPartitionBuilder This is a builder helper class.- Since:
- 1/4/14
-
-
Constructor Summary
Constructors Constructor Description CoordinateSharer(boolean isRuntimeUnion, org.slf4j.Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCoords(List<Coordinate> coords)
void
finish()
List<Coordinate>
getUnionCoords()
List<Integer>
reindex2shared(List<Coordinate> prev)
CoordinateND<T>
reindexCoordND(CoordinateND<T> prev)
If using runtimeUnion, or time2D, you must reindex the CoordinateNDvoid
showInfo(Formatter sb)
-
-
-
Method Detail
-
addCoords
public void addCoords(List<Coordinate> coords)
-
finish
public void finish()
-
getUnionCoords
public List<Coordinate> getUnionCoords()
-
reindexCoordND
public CoordinateND<T> reindexCoordND(CoordinateND<T> prev)
If using runtimeUnion, or time2D, you must reindex the CoordinateND- Parameters:
prev
- previous CoordinateND- Returns:
- new CoordinateND containing shared coordinates and sparseArray for the new coordinates or the prev CoordinateND if reindexing not needed.
-
reindex2shared
public List<Integer> reindex2shared(List<Coordinate> prev)
-
showInfo
public void showInfo(Formatter sb)
-
-