Package uk.ac.rdg.resc.edal.feature
Class GridFeature
- java.lang.Object
-
- uk.ac.rdg.resc.edal.feature.AbstractDiscreteFeature<GeoPosition,GridCell4D>
-
- uk.ac.rdg.resc.edal.feature.GridFeature
-
- All Implemented Interfaces:
Serializable
,DiscreteFeature<GeoPosition,GridCell4D>
,Feature<GeoPosition>
public class GridFeature extends AbstractDiscreteFeature<GeoPosition,GridCell4D>
An implementation of aFeature
whose domain is aGridDomain
- Author:
- Guy
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MapFeature
extractMapFeature(Set<String> varIds, RegularGrid targetGrid, Double elevation, org.joda.time.DateTime time)
Extracts aMapFeature
from thisGridFeature
GridDomain
getDomain()
Array4D<Number>
getValues(String paramId)
Gets the array of values for the given parameter.-
Methods inherited from class uk.ac.rdg.resc.edal.feature.AbstractDiscreteFeature
getDescription, getFeatureProperties, getId, getName, getParameter, getParameterMap, getVariableIds
-
-
-
-
Method Detail
-
getValues
public Array4D<Number> getValues(String paramId)
Description copied from interface:DiscreteFeature
Gets the array of values for the given parameter. The shape of this array must match the shape of the array of domain objects (fromDiscreteDomain.getDomainObjects()
).- Specified by:
getValues
in interfaceDiscreteFeature<GeoPosition,GridCell4D>
- Overrides:
getValues
in classAbstractDiscreteFeature<GeoPosition,GridCell4D>
- Parameters:
paramId
- The identifier from theFeature.getVariableIds()
set of parameter IDs.- Returns:
- the list of values for the requested member
-
getDomain
public GridDomain getDomain()
Description copied from interface:DiscreteFeature
- Specified by:
getDomain
in interfaceDiscreteFeature<GeoPosition,GridCell4D>
- Specified by:
getDomain
in interfaceFeature<GeoPosition>
- Overrides:
getDomain
in classAbstractDiscreteFeature<GeoPosition,GridCell4D>
- Returns:
- the domain of the values contained with the feature. May not
return
null
-
extractMapFeature
public MapFeature extractMapFeature(Set<String> varIds, RegularGrid targetGrid, Double elevation, org.joda.time.DateTime time) throws DataReadingException
Extracts aMapFeature
from thisGridFeature
- Parameters:
varIds
- The variable IDs to extract. Ifnull
, all variables are extracted.targetGrid
- The desiredRegularGrid
of the resultingMapFeature
elevation
- The elevation at which to extract data, can benull
only if thisGridFeature
has no vertical domaintime
- The time at which to extract data, can benull
only if thisGridFeature
has no vertical domain- Returns:
- The extracted
MapFeature
- Throws:
DataReadingException
- If there is a problem reading the required data
-
-