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

Custom tileprovider with tileSize=512 not showing up as higher resolution #307

Open
raynerhoward opened this issue Dec 5, 2021 · 0 comments

Comments

@raynerhoward
Copy link

raynerhoward commented Dec 5, 2021

I have added a custom tileprovider (JPEG) to ConfigProvider.js which has a tileSize of 512x512. Following the examples provided for WMTS in your themesConfig.json,

        "tileSize": [
          512,
          512
        ],

I have added tileSize to my themesConfig.json for a TMS (XYZ) tile set:

      {
        "type": "tileprovider",
        "provider": "Ortho2020JPG",
        "name": "ortho2020jpg",
        "title": "2020 Ortho JPG",
        "thumbnail": "img/mapthumbs/default.jpg",
        "tileSize":[
            512,
            512
        ]
      },

But qwc2 doesn't show the 'extra' resolution at the same zoom level as compared to a similar tile set having the default tile size of 256x256. Using dev mode (yarn start, localhost:8081).

I've tried various ways of setting tileSize in ConfigProvider.js to no avail:

    Ortho2020JPG: {
        url: 'http://myurl.com/ortho2020jpg/{z}/{x}/{y}.jpg',
        tileSize: [512,512],
        options: {
            maxZoom: 16,
            tileSize: 512,
            attribution: ''
        },
        layerOptions: {
            tileSize: 512
        }
    },

I've also tried it with tilePixelRatio. Is it possible to specify a 512x512 tile size with TMS or XYZ tile sets?

QGIS handles the 512x512 tile size with tilePixelRatio=2 in the datasource URI. I'm able to see the 'higher' resolution (more detail) in QGIS as compared to a similar tile set that's using 256x256 tiles.

EDIT: Adding the data source URIs for the two tile services here:

tilePixelRatio=1&type=xyz&url=https://ewx-orthos.s3.us-east-2.amazonaws.com/ortho2020/%7Bz%7D/%7Bx%7D/%7B-y%7D.png&zmax=16&zmin=8

created using gdal2tiles from gdal 3.3.4

tilePixelRatio=2&type=xyz&url=https://ewx-orthos.s3.us-east-2.amazonaws.com/ortho2020jpg/%7Bz%7D/%7Bx%7D/%7By%7D.jpg&zmax=16&zmin=8

created using gdal2tilesp from https://github.com/roblabs/gdal2tilesp since it allows for parallel processing and JPEG tiles (to save space), unfortunately (for me) it created 512x512 tiles

@raynerhoward raynerhoward changed the title Custom tileprovider with tileSize=512 not showing higher resolution Custom tileprovider with tileSize=512 not showing higher resolution (more detail) Dec 5, 2021
@raynerhoward raynerhoward changed the title Custom tileprovider with tileSize=512 not showing higher resolution (more detail) Custom tileprovider with tileSize=512 not showing up as higher resolution Dec 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant