Issues with wms on MATLAB R2020b

2 ビュー (過去 30 日間)
Julia
Julia 2024 年 8 月 21 日
コメント済み: Julia 2024 年 8 月 22 日
Hi! I have data that I plot on the traditional blue marble plot from NASA. I run this each month to plot new data; however, when I went to run it earlier in August, something seemed to be wrong with the wms commands. I am using MATLAB R2020b; I had pulled the original code directly from MATLAB:
layers = wmsfind("svs.gsfc.nasa.gov","SearchField","serverurl");
updatedLayers = wmsupdate(layers, "AllowMultipleServers",true);
blueMarble = refine(updatedLayers,"bluemarble","SearchField","abstract");
blueMarble512 = refine(blueMarble,"*512"); blueMarble512 = blueMarble512(1);
[A,R] = wmsread(blueMarble512); plabel off mlabel off
geoshow(A,R)
The error I am getting is:
Warning: An error occurred while attempting to update layers from the server, 'https://svs.gsfc.nasa.gov/cgi-bin/wms?'.
These layers are being removed from the layer array. The number of layers from this server that are being removed from the
layer array is 326. The error message returned by the server is: 'The Capabilities file from the host 'svs.gsfc.nasa.gov'
cannot be found.'.
> In wmsupdate>synchronizeLayerArray (line 154)
In wmsupdate (line 95)
My data still plots, but without the bluemarble. I can't seem to find any other information other than get a newer version of MATLAB to use readgeotable.

回答 (1 件)

Karanjot
Karanjot 2024 年 8 月 22 日
Hi Julia,
i can see that you're encountering the following error while trying to utilise the traditional blue marble plot from NASA:
'The Capabilities file from the host 'svs.gsfc.nasa.gov' cannot be found.'.
The error message you're encountering suggests that the issue is with the NASA server that provides the Web Map Service (WMS) data, rather than with your MATLAB code. The specific server https://svs.gsfc.nasa.gov/cgi-bin/wms? appears to be unavailable, which is why MATLAB cannot retrieve the "Capabilities" file needed to access the Blue Marble layers. I recommend contacting NASA for the same.
If you have a local copy of the Blue Marble image, you can use the geoshow function to display it and update layers manually:
% Assume 'blueMarbleImage.jpg' is your local Blue Marble image
[A, R] = readgeoraster('blueMarbleImage.img');
figure;
geoshow(A, R);
title('Blue Marble Image');
To know more, Refer to the following documentation:
https://in.mathworks.com/help/releases/R2020b/map/ref/geoshow.html
  1 件のコメント
Julia
Julia 2024 年 8 月 22 日
I appreciate your response! Do you have a good reference on where to download the blue marble image from? The NASA site only has to .png and .jpg formats. Even after converting it to .img, it looks like some of the filedata isn't properly populated so I can't display the map still.

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

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by