- 作者帖子
tigershuai游客未曾老师,这张图 guernica.museoreinasofia.es/gigap.../-119.2889 在开发者工具中找不到长、宽信息,小块图的命名格式也和其他的图不一样,怎么下载呢?
未曾管理员@tigershuai #30437
相关参数在页面源代码
var mapConfig = { id: "DE00050", canales: ["VIS","UV","IR","RX","RVIS","RUV","RIR"], canales_config: {} }; mapConfig.canales_config['VIS'] = { width: 343092, // punto final 344009.5, 155012.5 height: 154550, max_zoom: 12, zoom: 11, origenX: 917, origenY: 462 }; mapConfig.canales_config['IR'] = { width: 378568, //380928, //punto final 379114, 170862 height: 170668, //172032, max_zoom: 11, zoom: 11, origenX: 546, //453, origenY: 194//653 }; mapConfig.canales_config['UV'] = { width: 343117, //punto final 343884, 154890 height: 154612, max_zoom: 12, zoom: 11, origenX: 767, origenY: 278 }; mapConfig.canales_config['RX'] = { width: 314028, height: 142418, max_zoom: 10, zoom: 11, origenX: 0, origenY: 204 }; mapConfig.canales_config['RVIS'] = { width: 13502, height: 6131, max_zoom: 7, zoom: 6, origenX: 0, origenY: 0 }; mapConfig.canales_config['RIR'] = { width: 12896, height: 5890, max_zoom: 7, zoom: 6, origenX: 0, origenY: 0 }; mapConfig.canales_config['RUV'] = { width: 12888, height: 5883, max_zoom: 7, zoom: 6, origenX: 0, origenY: 0 };
这个不是通用的程序。具体下载方法,可以自己琢磨~
tigershuai游客@未曾 #30438
老师,我对此图编码如下:
url_template: "https://s3.eu-central-1.amazonaws.com/guernica/VIS/12/1204/{{x/256}}_{{y/256}}.png"
variables:
- name: x
from: 0
to: 380928 # Image width
step: 256 # Tile width- name: y
from: 0
to: 172032 # Image height
step: 256 # Tile height- name: tile_size
value: 256执行dezoomify-rs “tiles.yaml” “all.png”后出现如下错误
请问老师哪儿出现错误了呢?
tigershuai游客@未曾 #30438
老师,明白了,代码改为https://s3.eu-central-1.amazonaws.com/guernica/VIS/12/1204/{{256}}.png就可以了。再次感谢老师的提点。
tigershuai游客@未曾 #30438
再请老师指导,类似这样的图上面的源代码是怎么得到的呢?
tigershuai游客
tigershuai游客
未曾管理员
tigershuai游客@未曾 #30459
老师,怎么样才能yaml文件配置一下Referer?
未曾管理员
坐看云起游客这个网站没有限制直接访问碎片地址,所以不应该是Referer的原因
貌似YAML应该用这样的URL:
s3.eu-central-1.amazonaws.com/guernica/VIS/12/ {{x/256}}/{{y/256}}.png
tigershuai游客@坐看云起 #30468
这个URL我试了,运行出现了错误
坐看云起游客@tigershuai #30471
试下这个(最后三行需要缩进两格),我下载成功了。我只下了level 7.
url_template: "https://s3.eu-central-1.amazonaws.com/guernica/VIS/7/{{x}}/{{y}}.png"
x_template: "x * tile_size"
y_template: "y * tile_size"
variables:
- { name: x, from: 0, to: 84 } # Image width, in tiles
- { name: y, from: 0, to: 37 } # Image height, in tiles
- { name: tile_size, value: 256 }
tigershuai游客@坐看云起 #30474
能不能解释一下每个代码行的涵义,84、37是怎么计算出的呢?
坐看云起游客@tigershuai #30476
我是直接把图片拉到右下角,获得各个级别的最后一个碎片文件,
例如第七级是:s3.eu-central-1.amazonaws.com/guernica/VIS/7/84/37.png
第八级是:s3.eu-central-1.amazonaws.com/guernica/VIS/8/168/75.png
所以下载第七级的图片,X=0-84;Y=0-37
下载第八级的图片,X=168;Y=75
区别是,你用的YAML是用图片尺寸除以碎片尺寸(256)来得到URL,我用的YAML没有经过换算。最后的结果一样,就是用公式告诉程序每个碎片文件的URL。你的YAML需要得到图片的尺寸;我的YAML需要得到最后一个碎片文件的地址。
tigershuai游客@坐看云起 #30478
感谢指点
秋涩游客University of California 是哪个图书馆,谁能给个官网链接,谢谢各位了
- 作者帖子
正在查看 17 个帖子:1-17 (共 17 个帖子)
正在查看 17 个帖子:1-17 (共 17 个帖子)
正在查看 17 个帖子:1-17 (共 17 个帖子)