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

Mixed image formats doesn't work with s3/local directories tiles cache #605

Open
AnguIar opened this issue Oct 18, 2022 · 7 comments · Fixed by #796
Open

Mixed image formats doesn't work with s3/local directories tiles cache #605

AnguIar opened this issue Oct 18, 2022 · 7 comments · Fixed by #796
Labels

Comments

@AnguIar
Copy link

AnguIar commented Oct 18, 2022

Context

Mapproxy has the ability to use mixed image formats (https://mapproxy.org/docs/nightly/configuration.html#format).
It works fine when the tiles stored in a geopackage file, but doesn't work when using s3/local directory hierarchy.

Expected Behavior

Tiles should be rendered to the client.

Actual Behavior

Nothing is rendered. All tiles are empty.

Possible Fix

S3:
When making a request (as shown here) the file's extension is .mixed. Since the original file extension isn't known, we need to consider checking for the correct extension and use it.
Worst case scenario is making two requests per tile in order to find out the extension.

FS:
It's the same for FS - this line.

Steps to Reproduce

Create a directory with mixed tiles in it, upload to it S3 / use it locally and try to configure Mapproxy to use it.

Your Environment

  • Version used: 1.15.1.post20221002
  • Environment name and version: Pyhon 3.8
  • Operating System and version: Ubuntu 20.04
@shimoncohen
Copy link
Contributor

shimoncohen commented Jan 10, 2024

@weskamm @simonseyock Could you please reopen this issue? The PR was reverted.

@gu-LGB
Copy link

gu-LGB commented Jan 15, 2024

I had asked to revert the PR on this ticket. The background is that our services with the .mixed cache format only displayed white tiles. Here is my config - it may help to understand the problem: dop20.zip

I will also ask Mr Weskamm again to reopen this ticket.

@shimoncohen
Copy link
Contributor

shimoncohen commented Jan 15, 2024

Thank you very much!
Does your cache contains all of the files with the .mixed extension? Because IMO the point of this PR is to use the correct extensions for each file e.g. jpeg and png (As breaking changes of course).

@gu-LGB
Copy link

gu-LGB commented Jan 16, 2024

Yes, I only have .mixed files:
grafik

@simonseyock simonseyock reopened this Jan 17, 2024
@simonseyock
Copy link
Contributor

simonseyock commented Jan 17, 2024

We would prefer to maintain backwards compatibility. That means we would want to be able to read .mixed files, but only write .jpeg and .png files. If that is very difficult, we could discuss if there is an upgrade path to convert existing files. (Not all caches can be refetched).

@gu-LGB
Copy link

gu-LGB commented Jan 17, 2024

Both good ideas. We also have caches that cannot be refetched.

@shimoncohen
Copy link
Contributor

I understand, I'll try to keep the fix backwards compatible for fetching the .mixed files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants