Represents an object that can provide elevations at given coordinates.

Note: to combine multiple providers into one, you can use the aggregateElevationProviders function.

interface ElevationProvider {
    getElevation(options: GetElevationOptions, result?: GetElevationResult): GetElevationResult;
}

Implemented by

Methods

Methods

  • Sample the elevation at the specified coordinate.

    Note: sampling might return more than one sample for any given coordinate. You can sort them by resolution to select the best sample for your needs.

    Parameters

    • options: GetElevationOptions

      The options.

    • Optionalresult: GetElevationResult

      The result object to populate with the samples. If none is provided, a new empty result is created. The existing samples in the array are not removed. Useful to cumulate samples across different providers.

    Returns GetElevationResult

    The GetElevationResult containing the updated sample array.