@basemaps/tiler
TypeScript icon, indicating that this package has built-in type declarations

7.1.0 • Public • Published

@basemaps/tiler

Given a collection of CogGeoTiffs, generate the composition pipeline required to create a XYZ WebMercator tile

See @basemaps/tiler-sharp for how to run the composition pipeline in NodeJs

Usage

import { Tiler } from '@basemaps/tiler';
const tiler = new Tiler(256 /* Tile size px */);
const tiffs = [tiffA, tiffB]; // @cogeotiff/core GeoTiff's
const layers = await tiler.tile(tiffs, x, y, z);
// Layers is now the positioning and scaling information for the tiffs

import { TilerMaker } from '@basemaps/tiler-sharp';
const maker = new TileMaker(256);
const data = await maker.compose(layers);
console.log(data.buffer); // PNG image of the resulting layers

Readme

Keywords

none

Package Sidebar

Install

npm i @basemaps/tiler

Weekly Downloads

7

Version

7.1.0

License

MIT

Unpacked Size

32.2 kB

Total Files

16

Last publish

Collaborators

  • blacha
  • linzds