import { Bounds } from './features/Bounds'; import { Line } from './features/Line'; import { Point } from './features/Point'; import { Unit } from './features/Unit'; import { Pixel } from './tile/Pixel'; /** * Grid utilities */ export declare class GridUtils { /** * Get the pixel where the point fits into the bounds * * @param width * width * @param height * height * @param bounds * bounds * @param point * point * @return pixel */ static getPixel(width: number, height: number, bounds: Bounds, point: Point): Pixel; /** * Get the X pixel for where the longitude in meters fits into the bounds * * @param width * width * @param bounds * bounds * @param longitude * longitude in meters * @return x pixel */ static getXPixel(width: number, bounds: Bounds, longitude: number): number; /** * Get the Y pixel for where the latitude in meters fits into the bounds * * @param height * height * @param bounds * bounds * @param latitude * latitude * @return y pixel */ static getYPixel(height: number, bounds: Bounds, latitude: number): number; /** * Get the tile bounds from the XYZ tile coordinates and zoom level * * @param x * x coordinate * @param y * y coordinate * @param zoom * zoom level * @return bounds */ static getBounds(x: number, y: number, zoom: number): Bounds; /** * Get the tiles per side, width and height, at the zoom level * * @param zoom * zoom level * @return tiles per side */ static tilesPerSide(zoom: number): number; /** * Get the tile size in meters * * @param tilesPerSide * tiles per side * @return tile size */ static tileSize(tilesPerSide: number): number; /** * Get the zoom level of the bounds using the shortest bounds side length * * @param bounds * bounds * @return zoom level */ static getZoomLevel(bounds: Bounds): number; /** * Convert a coordinate from a unit to another unit * * @param fromUnit * unit of provided coordinate * @param longitude * longitude * @param latitude * latitude * @param toUnit * desired unit * @return point in unit */ static toUnit(fromUnit: Unit, longitude: number, latitude: number, toUnit: Unit): Point; /** * Convert a coordinate to the unit, assumes the coordinate is in the * opposite unit * * @param longitude * longitude * @param latitude * latitude * @param unit * desired unit * @return point in unit */ static toUnitOpposite(longitude: number, latitude: number, unit: Unit): Point; /** * Is the band letter an omitted letter * {@link GridConstants#BAND_LETTER_OMIT_I} or * {@link GridConstants#BAND_LETTER_OMIT_O} * * @param letter * band letter * @return true if omitted */ static isOmittedBandLetter(letter: string): boolean; /** * Get the precision value before the value * * @param value * value * @param precision * precision * @return precision value */ static precisionBefore(value: number, precision: number): number; /** * Get the precision value after the value * * @param value * value * @param precision * precision * @return precision value */ static precisionAfter(value: number, precision: number): number; /** * Get the point intersection between two lines * * @param line1 * first line * @param line2 * second line * @return intersection point or null if no intersection */ static lineIntersection(line1: Line, line2: Line): Point | undefined; /** * Get the point intersection between end points of two lines * * @param line1Point1 * first point of the first line * @param line1Point2 * second point of the first line * @param line2Point1 * first point of the second line * @param line2Point2 * second point of the second line * @return intersection point or null if no intersection */ static intersection(line1Point1: Point, line1Point2: Point, line2Point1: Point, line2Point2: Point): Point | undefined; } //# sourceMappingURL=GridUtils.d.ts.map