Package org.geotools.imageio.netcdf
Class VariableAdapter
Object
CoverageSourceDescriptor
VariableAdapter
- Author:
- Simone Giannecchini, GeoSolutions SAS
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classTODO improve support for thisstatic classstatic classstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidClear the parsed unit cachecreateFeatureForSplitIndex(int[] splitIndex, int globalImageIndex, SimpleFeatureType indexSchema) protected GridGeometry2DExtracts thegrid geometryfrom the unidata variable.intintgetLocalImageIndex(int[] indices) intgetNDimensionIndex(int n) Utility method to retrieve the index of a specific dimension index, for constructing the rangeintgetNIndex(int n, int imageIndex) Utility method to retrieve the n-index of a Variable coverageDescriptor stored onNetCDFImageReaderNetCDF Flat ReaderHashMapindexMap.intintintgetRank()int[]getShape()intgetWidth()mapIndex(int[] splittedIndex) int[]splitIndex(int imageIndex) Utility method to split the index of a Variable coverageDescriptor stored onNetCDFImageReaderNetCDF Flat ReaderHashMapindexMap into dimensions.voidupdateMapping(SimpleFeatureType indexSchema, List<DimensionDescriptor> descriptors) Update the dimensionDescriptor attributes mapping by checking the actual attribute names from the schemaMethods inherited from class CoverageSourceDescriptor
dispose, getAdditionalDomains, getDimensionDescriptors, getName, getRangeType, isHasAdditionalDomains, isHasTemporalDomain, isHasVerticalDomain, setAdditionalDomains, setDimensionDescriptors, setHasAdditionalDomains, setHasTemporalDomain, setHasVerticalDomain, setName, setRangeType, setSpatialDomain, setTemporalDomain, setVerticalDomain
-
Field Details
-
Z
public static final int Z- See Also:
-
T
public static final int T- See Also:
-
-
Constructor Details
-
VariableAdapter
- Throws:
Exception
-
-
Method Details
-
getRank
public int getRank() -
updateMapping
public void updateMapping(SimpleFeatureType indexSchema, List<DimensionDescriptor> descriptors) throws IOException Update the dimensionDescriptor attributes mapping by checking the actual attribute names from the schema- Throws:
IOException
-
getGridGeometry
Extracts thegrid geometryfrom the unidata variable.- Returns:
- the
GridGeometry2D. - Throws:
IOException
-
getNumBands
public int getNumBands() -
getSampleModel
-
getSpatialDomain
- Overrides:
getSpatialDomainin classCoverageSourceDescriptor
-
getTemporalDomain
- Overrides:
getTemporalDomainin classCoverageSourceDescriptor
-
getVerticalDomain
- Overrides:
getVerticalDomainin classCoverageSourceDescriptor
-
getWidth
public int getWidth()- Returns:
-
getHeight
public int getHeight()- Returns:
-
getNDimensionIndex
public int getNDimensionIndex(int n) Utility method to retrieve the index of a specific dimension index, for constructing the range- Parameters:
n- the dimension to retrieve the index for (0=Z, 1=T, 2+=Additional)- Returns:
- the index
-
getNIndex
public int getNIndex(int n, int imageIndex) Utility method to retrieve the n-index of a Variable coverageDescriptor stored onNetCDFImageReaderNetCDF Flat ReaderHashMapindexMap.- Parameters:
n-intthe dimensionimageIndex-intthe image index- Returns:
- n-index
int-1 if not present
-
splitIndex
public int[] splitIndex(int imageIndex) Utility method to split the index of a Variable coverageDescriptor stored onNetCDFImageReaderNetCDF Flat ReaderHashMapindexMap into dimensions.- Parameters:
imageIndex-intthe index- Returns:
- splitted index
-
getLocalImageIndex
public int getLocalImageIndex(int[] indices) -
mapIndex
-
getNumberOfSlices
public int getNumberOfSlices()- Returns:
- the numberOfSlices
-
getShape
public int[] getShape()- Returns:
- the shape
-
getTimeAttributeName
-
getElevationAttributeName
-
getAdditionalDomainAttributeName
-
createFeatureForSplitIndex
public SimpleFeature createFeatureForSplitIndex(int[] splitIndex, int globalImageIndex, SimpleFeatureType indexSchema) -
clearCache
public static void clearCache()Clear the parsed unit cache
-