Package ucar.nc2.grib.grib1
Class Grib1SectionGridDefinition
- java.lang.Object
-
- ucar.nc2.grib.grib1.Grib1SectionGridDefinition
-
public class Grib1SectionGridDefinition extends Object
The Grid Definition Section for GRIB-1 files Effectively immutable, but caching lazy gds
-
-
Constructor Summary
Constructors Constructor Description Grib1SectionGridDefinition(byte[] rawData)Set Grib Definition section from byte array.Grib1SectionGridDefinition(Grib1SectionProductDefinition pds)Grib1SectionGridDefinition(ucar.unidata.io.RandomAccessFile raf)Read Grib Definition section from raf.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcalcCRC()Calculate the CRC of the entire byte arrayGrib1GdsgetGDS()intgetGridTemplate()Get Grid Template number (code table 6)intgetLength()longgetOffset()intgetPredefinedGridDefinition()From pds.getGridDefinitionbyte[]getRawBytes()get the raw bytes of the GDSbooleanhasVerticalCoordinateParameters()booleanisThin()is a "thin" gridStringtoString()
-
-
-
Constructor Detail
-
Grib1SectionGridDefinition
public Grib1SectionGridDefinition(ucar.unidata.io.RandomAccessFile raf) throws IOExceptionRead Grib Definition section from raf.- Parameters:
raf- RandomAccessFile, with pointer at start of section- Throws:
IOException- on I/O errorIllegalArgumentException- if not a GRIB-2 record
-
Grib1SectionGridDefinition
public Grib1SectionGridDefinition(byte[] rawData)
Set Grib Definition section from byte array.- Parameters:
rawData- the byte array
-
Grib1SectionGridDefinition
public Grib1SectionGridDefinition(Grib1SectionProductDefinition pds)
-
-
Method Detail
-
getRawBytes
public byte[] getRawBytes()
get the raw bytes of the GDS- Returns:
- GDS as byte[]
-
calcCRC
public long calcCRC()
Calculate the CRC of the entire byte array- Returns:
- CRC of the entire byte array
-
getLength
public int getLength()
-
getOffset
public long getOffset()
-
getGridTemplate
public int getGridTemplate()
Get Grid Template number (code table 6)- Returns:
- Grid Template number.
-
getPredefinedGridDefinition
public int getPredefinedGridDefinition()
From pds.getGridDefinition- Returns:
- pds.getGridDefinition, or -1 if uses a real Grib1SectionGridDefinition
-
getGDS
public Grib1Gds getGDS()
-
isThin
public final boolean isThin()
is a "thin" grid- Returns:
- if a thin grid
-
hasVerticalCoordinateParameters
public boolean hasVerticalCoordinateParameters()
-
-