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

ČÚZK Portal #27

Closed
Arekkusu1998 opened this issue Mar 12, 2020 · 6 comments
Closed

ČÚZK Portal #27

Arekkusu1998 opened this issue Mar 12, 2020 · 6 comments
Labels
enhancement New feature or request

Comments

@Arekkusu1998
Copy link

I can't create the info.json or .yaml files for the zoomable cadastral maps on the ČÚZK Portal. I provide two examples with different dimensions:
the huge preparatory map of Katastralgemeinde Landschau (activate Flash Player to see);
one of the definitive maps of Katastralgemeinde Schwanenberg (for this type of maps, perhaps ČÚZK could be added to the dezoomify-extension features, don't?).

In this regard, @lovasoa, I offer You my most sincere congratulations for Your genial extension🤗 ... and also my best wishes for Your health, given the bad times we live in😰. Take care, please.

@lovasoa lovasoa added the enhancement New feature or request label Mar 12, 2020
@lovasoa
Copy link
Owner

lovasoa commented Mar 12, 2020

Hello,
In the first case (the flash page), the format seems to be really custom. I'm not sure it would be worth investing the time to develop a dezoomer for just this case.
For the second page, the URL format of the tiles is documented here, you can use this information to create a tiles.yaml for your image. We have a tutorial about how to create this yaml file, you can even contribute to it if you want.

@Arekkusu1998
Copy link
Author

Thanks for Your timely reply, @lovasoa. However, I've to ask again 'cause, as You know, my expertise is poor😔.

For the second page, the URL format of the tiles is documented here, you can use this information to create a tiles.yaml for your image. We have a tutorial about how to create this yaml file, you can even contribute to it if you want.

I've read about MapServer carefully and tried to understand how to get the tiles.yaml file, but I really don't understand anything 😵!! Please, could You not help me as You did with @rigel71 for the Milan State Archive?

@lovasoa
Copy link
Owner

lovasoa commented Mar 12, 2020

Can you be more precise about what you do not understand in the tiles.yaml format ? I'd rather write a clear explanation once and for all, so that it can serve others too. Your feedback is well appreciated.

@Arekkusu1998
Copy link
Author

The problem isn't in the tiles.yaml format but in how to create that file. The example provided concerns an image that uses the IIP image server that supports the IIIF protocol, while here we've MapServer.
For example, a tile has a link address: https://archivnimapy.cuzk.cz/cgi-bin/mapserv.exe?mode=map&map=d%3A%2Fconfms%2Fcom%2Fcom_data%2F1462-1%2F1462-1-001_ol.map&map_imagetype=png24&mapext=2656.25+-4062.5+2812.5+-3906.25&imgext=2656.25+-4062.5+2812.5+-3906.25&map_size=256+256&imgx=128&imgy=128&imgxy=256+256
For a dummy like me, this is just a bunch of mysterious data and numbers.
It isn't intuitive to understand how to manipulate the links obtained from the analysis of the image when faced with an unknown format (such as MapServer), so I don't know if it will be possible to create a universal tutorial that anyone can understand.

@lovasoa
Copy link
Owner

lovasoa commented Mar 13, 2020

The yaml dezoomer allows you to dezoom images that are in any custom format. To use it, you have to study yourself the pattern of the URLs of the tiles that compose your image. So, you have to take the URL of a tile, and using the documentation, and trial and error, try to understand what each part of it means.

At first, it looks like a bunch of mysterious data and numbers, but when you look at all the tile URLs, you'll see that that largest part of the URL is common to all tiles, and only small parts (a few numbers) change from tile to tile. Your first goal is to identify these parts.

When you have identified these parts, you have to try and understand which part is responsible for what. For that, you can use the documentation you found, and simple trial and error: try altering the numbers in the URL yourself, and see what changes in the image.

The goal is to find one number in the URL such that when you change it, another tile appears with the same y-coordinate in the image, the same zoom level, but a different x coordinate. Then find a second number such that when you change it, a tile appears with same x-coordinate in the image, the same zoom level, but a different y coordinate.

Once you identified these two numbers in the URL, replace them with {{x}} and {{y}]}.

The yaml dezoomer works by generating all the possible values of X and Y between the bounds you gave. So you have to determine a minimal value, a maximal value, and a step. The minimal value is the smallest value you can put in the URL without getting an error, the maximal value is the largest, and the step is the size of your tiles: if tiles are 256x256, then you'll want dezoomify-rs to generate x values of 0, 256, 512, etc, so the step between successive values of X and Y are the width and height of tiles.

Finally, create the yaml file with the information you gathered :

url_template: "http://...{{x}}...{{y}}..."

variables:
  - name: x
    from: 0 # Minimal value by which you can replace {{x}} in the url without getting an error, usually 0
    to: 6824 # Maximal value by which you can replace {{x}} in the url without getting an error
    step: 256 # The width of a tile

  - name: y
    from: 0 # Minimal value by which you can replace {{y}} in the url without getting an error, usually 0
    to: 17025 # Maximal value by which you can replace {{y}} in the url without getting an error
    step: 256 # The height of a tile (usually the same as the width)

Let me know if you need more help. If you can get it, you can publish detailed instructions for others in the wiki.

@lovasoa
Copy link
Owner

lovasoa commented Nov 14, 2021

closed as per lovasoa/dezoomify-extension#31

@lovasoa lovasoa closed this as completed Nov 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants