Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ImageUtilities

Hierarchy

  • ImageUtilities

Index

Methods

Static getJimpImage

  • getJimpImage(uri: string, dir?: string, zipMap?: Map<string, any>): Promise<Jimp | void>
  • static
    memberof

    ImageUtilities

    Parameters

    • uri: string
    • Optional dir: string
    • Optional zipMap: Map<string, any>

    Returns Promise<Jimp | void>

    Return a promise of a JIMP image

Static insertZoomImages

  • insertZoomImages(image: Jimp, zoomLevels: number[], imageBBox: BoundingBox, geopackage: GeoPackage, imageName: string, progressCallback?: Function): Promise<void>
  • Determines the size of pixels and create tiles set based off zoom levels.

    static
    memberof

    ImageUtilities

    Parameters

    • image: Jimp

      Jimp image Object

    • zoomLevels: number[]

      Array of zoom level that image tile will be created for.

    • imageBBox: BoundingBox

      Images Bounding Box (Geopackage) with Lat-Lon

    • geopackage: GeoPackage

      GeoPackage where zoom images will be inserted into

    • imageName: string
    • Optional progressCallback: Function

    Returns Promise<void>

Static truncateImage

  • truncateImage(kmlBBox: BoundingBox, img: Jimp): Promise<[BoundingBox, Jimp]>
  • Crops image if the bounding is larger than Web Mercator bounds.

    static
    memberof

    ImageUtilities

    Parameters

    • kmlBBox: BoundingBox

      Geopackage Bounding Box in EPSG:4326

    • img: Jimp

      Jimp image.

    Returns Promise<[BoundingBox, Jimp]>

Generated using TypeDoc