gis-tools-ts
Version:
A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.
492 lines • 16.8 kB
TypeScript
import type { Reader } from '../../../index.js';
import type { Transformer } from '../../../../proj4/index.js';
import type { VectorPoint } from '../../../../geometry/index.js';
/**
* Returns a template generator for the given template number
* All templates are listed [here](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table3-1.shtml)
* @param template - template number parse block
* @param section - byte block
* @returns Template generator
*/
export declare function getGrib2Template3(template: number, section: Reader): {
/** Shape of Earth [Table 3.2](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table3-2.shtml) */
shape: {
code: number;
value: string;
};
/** Scale Factor of radius of spherical Earth */
radiusScaleFactor: number;
/** Scale value of radius of spherical Earth */
radiusScaleValue: number;
/** Scale factor of major axis of oblate spheroid Earth */
majorAxisScaleFactor: number;
/** Scale value of major axis of oblate spheroid Earth */
majorAxisScaleValue: number;
/** Scale factor of minor axis of oblate spheroid Earth */
minorAxisScaleFactor: number;
/** Scale value of minor axis of oblate spheroid Earth */
minorAxisScaleValue: number;
/** Number of points along a parallel (W-E) */
nx: number;
/** Number of points along a meridian (N-S) */
ny: number;
/** Basic angle of the initial production domain */
basicAngle: number;
/** Subdivisions of basic angle used to define extreme longitudes and latitudes, and direction increments */
subdivisions: number;
/** Latitude of first grid point */
lat1: number;
/** Longitude of first grid point */
lon1: number;
/** Resolution and component flags [Table 3.3](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table3-3.shtml) */
resolution: {
code: number;
value: {
iDirectionIncrements: {
code: number;
value: string;
};
jDirectionIncrements: {
code: number;
value: string;
};
vectorComponentResolution: {
code: number;
value: string;
};
};
};
/** Latitude of last grid point */
lat2: number;
/** Longitude of last grid point */
lon2: number;
/** i direction increment */
dx: number;
/** j direction increment */
dy: number;
/** Scanning mode [Table 3.4](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table3-4.shtml) */
scanMode: {
code: number;
value: {
xDir: {
code: number;
value: string;
};
yDir: {
code: number;
value: string;
};
adjacentDir: {
code: number;
value: string;
};
rowDir: {
code: number;
value: string;
};
rowOffset: {
code: number;
value: string;
};
pointOffsetX: {
code: number;
value: string;
};
pointOffsetY: {
code: number;
value: string;
};
rowGridRule: {
code: number;
value: string;
};
};
};
/** Grid Units */
gridUnits: string;
/**
* Convert this section into grid data
* @returns - grid data
*/
buildGrid: () => VectorPoint<Record<string, number>>[];
} | {
/** Shape of Earth [Table 3.2](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table3-2.shtml) */
shape: {
code: number;
value: string;
};
/** Scale Factor of radius of spherical Earth */
radiusScaleFactor: number;
/** Scale value of radius of spherical Earth */
radiusScaleValue: number;
/** Scale factor of major axis of oblate spheroid Earth */
majorAxisScaleFactor: number;
/** Scale value of major axis of oblate spheroid Earth */
majorAxisScaleValue: number;
/** Scale factor of minor axis of oblate spheroid Earth */
minorAxisScaleFactor: number;
/** Scale value of minor axis of oblate spheroid Earth */
minorAxisScaleValue: number;
/** Number of points along the x-axis */
nx: number;
/** Number of points along the y-axis */
ny: number;
/** Latitude of first grid point */
lat1: number;
/** Longitude of first grid point */
lon1: number;
/** Latitude where Dx and Dy are specified */
latD: number;
/** Orientation of the grid (LoV) */
lonV: number;
/** Resolution and component flags [Table 3.3](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table3-3.shtml) */
resolution: {
code: number;
value: {
iDirectionIncrements: {
code: number;
value: string;
};
jDirectionIncrements: {
code: number;
value: string;
};
vectorComponentResolution: {
code: number;
value: string;
};
};
};
/** x-direction grid length (meters at LaD) */
dx: number;
/** y-direction grid length (meters at LaD) */
dy: number;
/** Projection center flag [Table 3.5](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table3-5.shtml) */
projCenter: {
code: number;
value: {
plane: {
code: number;
value: string;
};
biPolar: {
code: number;
value: string;
};
};
};
/** Scanning mode [Table 3.4](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table3-4.shtml) */
scanMode: {
code: number;
value: {
xDir: {
code: number;
value: string;
};
yDir: {
code: number;
value: string;
};
adjacentDir: {
code: number;
value: string;
};
rowDir: {
code: number;
value: string;
};
rowOffset: {
code: number;
value: string;
};
pointOffsetX: {
code: number;
value: string;
};
pointOffsetY: {
code: number;
value: string;
};
rowGridRule: {
code: number;
value: string;
};
};
};
/** Grid Units */
gridUnits: string;
/**
* Convert this section into grid data
* @param transformer - projection transformer
* @returns - grid data
*/
buildGrid: (transformer?: Transformer) => VectorPoint<Record<string, number>>[];
};
/**
* # GRIB2 - GRID DEFINITION TEMPLATE 3.0
*
* ## Latitude/Longitude (or equidistant cylindrical, or Plate Carree)
*
* ## Links
* - [Read more...](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_temp3-0.shtml)
*
* ## Notes
* - Basic angle of the initial production domain and subdivisions of this basic angle are provided
* to manage cases where the recommended unit of 10-6 degrees is not applicable to describe the
* extreme longitudes and latitudes, and direction increments. For these last six descriptors, the
* unit is equal to the ratio of the basic angle and the subdivisions number. For ordinary cases,
* zero and missing values should be coded, equivalent to respective values of 1 and 106 (10-6
* degrees unit).
* - For data on a quasi-regular grid, in which all the rows or columns do not necessarily have the
* same number of grid points either Ni (octets 31-34) of Nj (octets 35-38) and the corresponding Di
* (octets 64-67) or Dj (octets 68-71) shall be coded with all bits set to 1 (missing). The actual
* number of points along each parallel or meridian shall be coded in the octets immediately following
* the grid definition template (octets [xx+1]-nn), as described in the description of the grid
* definition section.
* - A quasi-regular grid is only defined for appropriate grid scanning modes. Either rows or columns,
* but not both simultaneously, may have variable numbers of points or variable spacing. The first
* point in each row (column) shall be positioned at the meridian (parallel) indicted by octets 47-54.
* The grid points shall be evenly spaced in latitude (longitude).
* A scale value of radius of spherical Earth, or major axis of oblate spheroid Earth is delivered
* from applying appropriate scale factor to the value expressed in meters.
* - It is recommended to use unsigned direction increments.
* - In most cases, multiplying Ni (octets 31-34) by Nj (octets 35-38) yields the total number of
* points in the grid. However, this may not be true if bit 8 of the scanning mode flags (octet 72)
* is set to 1.
* @param section - byte block for template 3.0
* @returns - The parsed template
*/
export declare function grib2Template30(section: Reader): {
/** Shape of Earth [Table 3.2](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table3-2.shtml) */
shape: {
code: number;
value: string;
};
/** Scale Factor of radius of spherical Earth */
radiusScaleFactor: number;
/** Scale value of radius of spherical Earth */
radiusScaleValue: number;
/** Scale factor of major axis of oblate spheroid Earth */
majorAxisScaleFactor: number;
/** Scale value of major axis of oblate spheroid Earth */
majorAxisScaleValue: number;
/** Scale factor of minor axis of oblate spheroid Earth */
minorAxisScaleFactor: number;
/** Scale value of minor axis of oblate spheroid Earth */
minorAxisScaleValue: number;
/** Number of points along a parallel (W-E) */
nx: number;
/** Number of points along a meridian (N-S) */
ny: number;
/** Basic angle of the initial production domain */
basicAngle: number;
/** Subdivisions of basic angle used to define extreme longitudes and latitudes, and direction increments */
subdivisions: number;
/** Latitude of first grid point */
lat1: number;
/** Longitude of first grid point */
lon1: number;
/** Resolution and component flags [Table 3.3](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table3-3.shtml) */
resolution: {
code: number;
value: {
iDirectionIncrements: {
code: number;
value: string;
};
jDirectionIncrements: {
code: number;
value: string;
};
vectorComponentResolution: {
code: number;
value: string;
};
};
};
/** Latitude of last grid point */
lat2: number;
/** Longitude of last grid point */
lon2: number;
/** i direction increment */
dx: number;
/** j direction increment */
dy: number;
/** Scanning mode [Table 3.4](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table3-4.shtml) */
scanMode: {
code: number;
value: {
xDir: {
code: number;
value: string;
};
yDir: {
code: number;
value: string;
};
adjacentDir: {
code: number;
value: string;
};
rowDir: {
code: number;
value: string;
};
rowOffset: {
code: number;
value: string;
};
pointOffsetX: {
code: number;
value: string;
};
pointOffsetY: {
code: number;
value: string;
};
rowGridRule: {
code: number;
value: string;
};
};
};
/** Grid Units */
gridUnits: string;
/**
* Convert this section into grid data
* @returns - grid data
*/
buildGrid: () => VectorPoint<Record<string, number>>[];
};
/**
* # GRIB2 - GRID DEFINITION TEMPLATE 3.20
*
* ## Polar Stereographic Projection (Can be North or South)
*
* ## Links
* - [Read more...](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_temp3-20.shtml)
*
* ## Notes
* - The orientation of the grid is given by the longitude of the meridian along which the
* y-axis increases, LoV.
* - The projection is defined by the latitude at which Dx and Dy are specified, LaD.
* - Grid lengths Dx and Dy are in meters at the latitude LaD.
* - Bit 3 of the resolution and component flags should be set to 1 to indicate that Dx and Dy
* are given in meters.
* @param section - byte block for template 3.20
* @returns - The parsed template
*/
export declare function grib2Template320(section: Reader): {
/** Shape of Earth [Table 3.2](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table3-2.shtml) */
shape: {
code: number;
value: string;
};
/** Scale Factor of radius of spherical Earth */
radiusScaleFactor: number;
/** Scale value of radius of spherical Earth */
radiusScaleValue: number;
/** Scale factor of major axis of oblate spheroid Earth */
majorAxisScaleFactor: number;
/** Scale value of major axis of oblate spheroid Earth */
majorAxisScaleValue: number;
/** Scale factor of minor axis of oblate spheroid Earth */
minorAxisScaleFactor: number;
/** Scale value of minor axis of oblate spheroid Earth */
minorAxisScaleValue: number;
/** Number of points along the x-axis */
nx: number;
/** Number of points along the y-axis */
ny: number;
/** Latitude of first grid point */
lat1: number;
/** Longitude of first grid point */
lon1: number;
/** Latitude where Dx and Dy are specified */
latD: number;
/** Orientation of the grid (LoV) */
lonV: number;
/** Resolution and component flags [Table 3.3](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table3-3.shtml) */
resolution: {
code: number;
value: {
iDirectionIncrements: {
code: number;
value: string;
};
jDirectionIncrements: {
code: number;
value: string;
};
vectorComponentResolution: {
code: number;
value: string;
};
};
};
/** x-direction grid length (meters at LaD) */
dx: number;
/** y-direction grid length (meters at LaD) */
dy: number;
/** Projection center flag [Table 3.5](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table3-5.shtml) */
projCenter: {
code: number;
value: {
plane: {
code: number;
value: string;
};
biPolar: {
code: number;
value: string;
};
};
};
/** Scanning mode [Table 3.4](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table3-4.shtml) */
scanMode: {
code: number;
value: {
xDir: {
code: number;
value: string;
};
yDir: {
code: number;
value: string;
};
adjacentDir: {
code: number;
value: string;
};
rowDir: {
code: number;
value: string;
};
rowOffset: {
code: number;
value: string;
};
pointOffsetX: {
code: number;
value: string;
};
pointOffsetY: {
code: number;
value: string;
};
rowGridRule: {
code: number;
value: string;
};
};
};
/** Grid Units */
gridUnits: string;
/**
* Convert this section into grid data
* @param transformer - projection transformer
* @returns - grid data
*/
buildGrid: (transformer?: Transformer) => VectorPoint<Record<string, number>>[];
};
//# sourceMappingURL=templates.d.ts.map