@Immutable
public class Grib2SectionGridDefinition
extends java.lang.Object
Octet Contents 1–4 Length of section in octets (nn) 5 Number of section (3) 6 Source of grid definition (see Code table 3.0 and Note 1) 7–10 Number of data points 11 Number of octets for optional list of numbers (see Note 2) 12 Interpretation of list of numbers (see Code table 3.11) 13–14 Grid definition template number (= N) (see Code table 3.1) 15–xx Grid definition template (see Template 3.N, where N is the grid definition template number given in octets 13–14) [xx+1]–nn Optional list of numbers defining number of points (see Notes 2, 3 and 4)
Constructor and Description |
---|
Grib2SectionGridDefinition(byte[] rawData)
Set Grib Definition section from byte array.
|
Grib2SectionGridDefinition(RandomAccessFile raf)
Read Grib Definition section from raf.
|
Modifier and Type | Method and Description |
---|---|
long |
calcCRC()
Calculate the CRC of the entire byte array
|
Grib2Gds |
getGDS() |
int |
getGDSTemplateNumber()
Get GDS Template number (code table 3.1)
|
int |
getLength() |
int |
getNumberPoints()
octets 7-10
number of data points .
|
long |
getOffset() |
byte[] |
getRawBytes()
get the raw bytes of the GDS
|
int |
getSource()
octet 6
source of grid definition (Code Table 3.0)
"If octet 6 is not zero, octets 15–xx (15–nn if octet 11 is zero) may not be supplied.
|
public Grib2SectionGridDefinition(RandomAccessFile raf) throws java.io.IOException
raf
- RandomAccessFile, with pointer at start of sectionjava.io.IOException
- on I/O errorjava.lang.IllegalArgumentException
- if not a GRIB-2 recordpublic Grib2SectionGridDefinition(byte[] rawData)
rawData
- the byte arraypublic byte[] getRawBytes()
public long calcCRC()
public int getLength()
public long getOffset()
public int getSource()
public int getNumberPoints()
public int getGDSTemplateNumber()
public Grib2Gds getGDS()