imread not working for certain http server urls (for openstreetmap GIS)?

2 ビュー (過去 30 日間)
Erik Johannes Loo
Erik Johannes Loo 2021 年 11 月 10 日
コメント済み: Walter Roberson 2021 年 11 月 10 日
Using imread/webread is not working for certain http(s) servers. 'webread' says it cannot establish a secure connection - asking me to check my certificate file (but I have never touched these certs). 'imread' fails at 'getFileFromURL', however it was working fine until recently - so I suspect something changed in the host? The url is https://tiles.wmflabs.org/osm-no-labels/12/1974/1326.png if that matters. Using R2018b
My current workaround is to use (which works) but it's clunky:
urlwrite(url, 'temp.png')
[img, cmap, alpha] = imread('temp.png');
  3 件のコメント
Erik Johannes Loo
Erik Johannes Loo 2021 年 11 月 10 日
It works for me only if I use urlwrite - but I would ideally read it directly with imread - and that does not seem to be working. It says 'Can't read URL "https://tiles.wmflabs.org/osm-no-labels/12/1974/1326.png".' Maybe I am being too picky since I do have a workaround, but it used to work before. Maybe there is something else on my system which is causing it not too work - like the certs or my VPN
Walter Roberson
Walter Roberson 2021 年 11 月 10 日
It works for me starting with R2019b.
I thought I had detected that the certificate had moved in later releases, but I just checked and see that the .pem I located is a self-signed certificate to allow MATLAB to talk to other Mathworks processes, it appears.
So possibly these days it is relying on system certificates. If so, then possibly if you renamed rootcerts.pem to something else so that it is not found, then maybe your operating system certificates would kick in.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by