Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PROPOSAL] Define a WMTS source with a list of matrix ids instead of sticking to whole CRS pyramid level #2475

Open
airnez opened this issue Dec 13, 2024 · 0 comments
Labels
proposal 👍 Proposal of a new feature

Comments

@airnez
Copy link
Contributor

airnez commented Dec 13, 2024

Context

The WMTSSource allows to define a tileMatrixCallBack, inherited from TMSSource :

new itowns.WMTSSource({
                ...
                tileMatrixCallback: zoomLevel => some logic
            });

This is helpful because tileMatrix identifiers may be named independently from CRS pyramid zoom level values.
However, in WMTS, matrix ids are known in advance and could be directly provided with a list of identifiers like what is done in openLayers :

new ol.source.WMTS({
                ...
                tileGrid : new ol.tilegrid.WMTS({
                    origin: [...],
                    resolutions: [...],
                    matrixIds: [...]
                })
            })

Or in Cesium :

new Cesium.WebMapTileServiceImageryProvider({
            ...
            tilingScheme: new Cesium.WebMercatorTilingScheme(),
            tileMatrixLabels: [...],
        })

Moreover, a tileMatrix might actually start at any higher level than the CRS 'zero'. This layer's tileMatrix starts at EPSG:3857 6th level for instance :

new itowns.WMTSSource({
            url: 'https://data.geopf.fr/wmts',
            crs: 'EPSG:3857',
            format: 'image/jpeg',
            name: 'HR.ORTHOIMAGERY.ORTHOPHOTOS',
            tileMatrixSet: 'PM_6_19',
            version: '1.0.0',
            style: 'normal'
        });

The zoomLevel to tileMatrix Id mapping is not a directly available information in WMTS getCapabilities response and requires extra computation / inference steps.

Description of the proposal

It would be nice for the end-user to let iTowns query the right matrix id based on ScaleDenominator (from capabilities) or resolutions. It could then internally map those ids to whole pyramid zoomLevels. I guess this would be easier to do after #2290 and some kind of tileGrid implementation.

@airnez airnez added the proposal 👍 Proposal of a new feature label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal 👍 Proposal of a new feature
Projects
None yet
Development

No branches or pull requests

1 participant