itowns
Version:
A JS/WebGL framework for 3D geospatial data visualization
71 lines (70 loc) • 2.19 kB
TypeScript
import * as THREE from 'three';
import { Extent } from '@itowns/geographic';
declare class Tile {
readonly isTile: true;
crs: string;
zoom: number;
row: number;
col: number;
/**
* A tile is a geographical bounding rectangle uniquely defined by its zoom,
* row and column.
*
* @param crs - projection of limit values.
* @param zoom - `zoom` value. Default is 0.
* @param row - `row` value. Default is 0.
* @param col - `column` value. Default is 0.
*/
constructor(crs: string, zoom?: number, row?: number, col?: number);
/**
* Returns a new tile with the same bounds and crs as this one.
*/
clone(): Tile;
/**
* Converts this tile to the specified extent.
* @param crs - target's projection.
* @param target - The target to store the projected extent. If this not
* provided a new extent will be created.
*/
toExtent(crs: string, target?: Extent): Extent;
/**
* Checks whether another tile is inside this tile.
*
* @param extent - the tile to check.
*/
isInside(tile: Tile): boolean;
/**
* Returns the translation and scale to transform this tile to the input
* tile.
*
* @param tile - the input tile.
* @param target - copy the result to target.
*/
offsetToParent(tile: Tile, target?: THREE.Vector4): THREE.Vector4;
/**
* Returns the parent tile at the given level.
*
* @param levelParent - the level of the parent tile.
*/
tiledExtentParent(levelParent: number): Tile;
/**
* Sets zoom, row and column values.
*
* @param zoom - zoom value.
* @param row - row value.
* @param col - column value.
*/
set(zoom?: number, row?: number, col?: number): this;
/**
* Copies the passed tile to this tile.
* @param tile - tile to copy.
*/
copy(tile: Tile): this;
/**
* Return values of tile in string, separated by the separator input.
* @param separator - string separator
*/
toString(separator?: string): string;
}
export declare function tiledCovering(e: Extent, tms: string): Tile[];
export default Tile;