Extends the BaseWxAPI class from the @metoceanapi/wxtiles-common package. Provides additional functionality for creating dataset managers.

Hierarchy

  • WxAPI
    • WxAPI

Constructors

  • Initializes a new instance of the WxAPI class.

    Parameters

    • options: WxAPIOptions

      Configuration options for the WxAPI instance. See WxAPIOptions.

    Returns WxAPI

Properties

dataServerURL: string

The URL of the data server. See WxAPIOptions for configuration details.

ext: string

see WxAPIOptions

initDone: Promise<void>

A Promise that resolves when the WxAPI instance is fully initialized and ready to be used.

loadMaskFunc: ((__namedParameters: XYZ) => Promise<ImageData>)

Type declaration

    • (__namedParameters: XYZ): Promise<ImageData>
    • Internal

      A function that loads mask tiles asynchronously.

      Returns

      A Promise that resolves to the ImageData of the tile.

      Parameters

      • __namedParameters: XYZ

      Returns Promise<ImageData>

maskChannel: number

The channel used for mask tiles. See WxAPIOptions for details.

maskDepth: number

The depth level used for mask tiles. See WxAPIOptions for more information.

maskURL: string

The URL for the mask tiles. See WxAPIOptions for more information.

qtree: QTree

An instance of the QTree object, used internally for spatial indexing.

requestInit?: RequestInit

Optional configuration for HTTP requests. See WxAPIOptions for details.

Methods

  • Creates a dataset manager for the specified dataset.

    Returns

    A promise that resolves to a WxDataSetManager instance.

    Example

    const api = new WxAPI();
    const datasetManager = await api.createDatasetManager("gfs.global");

    Parameters

    • datasetName: string

      The name of the dataset to manage.

    Returns Promise<WxDataSetManager>

  • Parameters

    • datasetName: string

    Returns Promise<WxDataSetManagerOptions>

  • Returns datasets names which have given variable

    Argument

    varName - variable name to search for in datasets

    Returns

    • list of datasets' names

    Parameters

    • varName: string

    Returns Promise<string[]>

  • Get the list of all available datasets' names

    Returns

    • list of all available datasets' names

    Returns Promise<string[]>

  • Get all variables for the given dataset name.

    Returns

    • list of all available variables for the dataset

    Parameters

    • datasetName: string

      dataset name

    Returns Promise<undefined | string[]>

Generated using TypeDoc