Issues with wms on MATLAB R2020b
2 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
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
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!