Package ucar.nc2.dt.grid
Class GridAsPointDataset
- java.lang.Object
-
- ucar.nc2.dt.grid.GridAsPointDataset
-
public class GridAsPointDataset extends Object
Add Point operations to a GridDataset.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GridAsPointDataset.Point
-
Constructor Summary
Constructors Constructor Description GridAsPointDataset(List<GridDatatype> grids)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<CalendarDate>
getDates()
double
getMissingValue(GridDatatype grid)
boolean
hasTime(GridDatatype grid, CalendarDate date)
boolean
hasVert(GridDatatype grid, double zCoord)
GridAsPointDataset.Point
readData(GridDatatype grid, CalendarDate date, double lat, double lon)
GridAsPointDataset.Point
readData(GridDatatype grid, CalendarDate date, double zCoord, double lat, double lon)
GridAsPointDataset.Point
readData(GridDatatype grid, CalendarDate date, double ensCoord, double zCoord, double lat, double lon)
Reads one single data for one point.GridAsPointDataset.Point
readData(GridDatatype grid, CalendarDate date, EarthLocation location, boolean bounded)
Reads data for the given point (earthlocation) and if bounded is true returns data for the closest point within the grid, for points outside of the grid
-
-
-
Constructor Detail
-
GridAsPointDataset
public GridAsPointDataset(List<GridDatatype> grids)
-
-
Method Detail
-
getDates
public List<CalendarDate> getDates()
-
hasTime
public boolean hasTime(GridDatatype grid, CalendarDate date)
-
getMissingValue
public double getMissingValue(GridDatatype grid)
-
readData
public GridAsPointDataset.Point readData(GridDatatype grid, CalendarDate date, double lat, double lon) throws IOException
- Throws:
IOException
-
hasVert
public boolean hasVert(GridDatatype grid, double zCoord)
-
readData
public GridAsPointDataset.Point readData(GridDatatype grid, CalendarDate date, double zCoord, double lat, double lon) throws IOException
- Throws:
IOException
-
readData
public GridAsPointDataset.Point readData(GridDatatype grid, CalendarDate date, double ensCoord, double zCoord, double lat, double lon) throws IOException
Reads one single data for one point. Takes the ensemble and elevation coordinates allowing them to be < 0 and in that case they'll be ignored.- Returns:
- Point matching lat/lon for this grid
- Throws:
IOException
-
readData
public GridAsPointDataset.Point readData(GridDatatype grid, CalendarDate date, EarthLocation location, boolean bounded) throws IOException
Reads data for the given point (earthlocation) and if bounded is true returns data for the closest point within the grid, for points outside of the grid- Parameters:
grid
- read data from heredate
- at this timelocation
- EarthLocation, if altitude is NaN assume that is 2D pointbounded
- if bounded, location must be in grid cell; otherwise get nearest grid point to location- Returns:
- the location and data value
- Throws:
IOException
- on bad stuff
-
-