locar-tiler
    Preparing search index...

    Class DEM

    Index

    Constructors

    • Create a new DEM.

      Parameters

      • elevs: number[]

        array of elevations in metres.

      • bottomLeft: EastNorth

        the bottom left coordinate of the DEM in Spherical Mercator.

      • ptWidth: number

        number of points within the DEM in the horizontal direction.

      • ptHeight: number

        number of points within the DEM in the vertical direction.

      • xSpacing: number

        spacing in Spherical Mercator units in the horizontal direction.

      • ySpacing: number

        spacing in Spherical Mercator units in the vertical direction.

      Returns DEM

    Properties

    elevs: number[]

    Methods

    • Obtains the elevation in metres at a given x and y Spherical Mercator coordinate using bilinear interpolation.

      Parameters

      • x: number

        the Spherical Mercator x coordinate.

      • y: number

        the Spherical Mercator y coordinate.

      Returns number

      the elevation in metres

    • Return the number of points in the x and y directions.

      Returns [number, number]

    • Return the spacing in Spherical Mercator units in the x and y directions.

      Returns [number, number]

    • Process the DEM data with a custom function. The function has access to all the key properties of the DEM.

      Parameters

      • fn: (
            elevs: number[],
            bottomLeft: EastNorth,
            ptWidth: number,
            ptHeight: number,
            xSpacing: number,
            ySpacing: number,
        ) => void

      Returns void