Skip to content

Use exact TileMatrixSet specification #216

@kylebarron

Description

@kylebarron

In our current implementation here, we have a TileMatrixSet type that is very similar to the OGC TileMatrixSet spec, but not exactly:

/**
* COG Metadata extracted from GeoTIFF
*/
export type TileMatrixSet = {
/**
* Title of this tile matrix set, normally used for display to a human
*/
title?: string;
/**
* Brief narrative description of this tile matrix set, normally available for display to a human
*/
description?: string;
crs: CRS;
boundingBox?: TileMatrixSetBoundingBox;
/**
* Describes scale levels and its tile matrices
*/
tileMatrices: TileMatrix[];
/**
* Bounding box of this TMS in WGS84 lon/lat.
*/
wgsBounds: TileMatrixSetBoundingBox;
projectToWgs84: (point: [number, number]) => [number, number];
projectTo3857: (point: [number, number]) => [number, number];
};

It would be good to switch our implementation to use the exact TileMatrixSet type for interoperability.

I started creating a new port of morecantile to TypeScript: morecantile-ts. This has auto-generated types from the underlying spec. I'd like to put some helpers related to morecantile (like affine transforms) in morecantile-ts that we can then depend on here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions