WMSREAD - Blank Map Returned

1 次查看(过去 30 天)
Davide Oscar
Davide Oscar 2014-7-26
I'm trying to import raster data from a WMS server available in the WMS database but a blank map is always returned.
The code is very simple:
------------------------------------------
layers = wmsfind('rischio');
layers = wmsupdate(layers, 'AllowMultipleServers', true);
selLayer = layers.refine('dbu:PAI_RISCHIOFRANA', 'SearchField', 'layername', 'MatchType', 'exact');
selLayer=selLayer(1);
selLayer = wmsupdate(selLayer, 'AllowMultipleServers', true);
%% ServerURL: 'http://webgis.regione.sardegna.it/geoserver/wms?'
latlim = [39 41];
lonlim = [8.5 9.5];
imageLength = 2000;
imageFormat = 'image/png';
[A,R,mapRequestURL] = wmsread(selLayer, 'Latlim', latlim, 'Lonlim', lonlim, 'ImageHeight', imageLength, 'ImageWidth', imageLength, 'ImageFormat', imageFormat);
geoshow(A,R)
------------------------------------------------
I have changed the lat/lon extension, the image width/length, the image format, but the result is always the same. This is strange because the WMS server is really accessible through GIS instruments like QGIS. Any suggestion? Thanks in advance
  1 个评论
Geoff Hayes
Geoff Hayes 2014-7-26
When you step through the code, does the output at each statement make sense? i.e. what is the value of layers? what is the value of selLayer? etc.

请先登录,再进行评论。

回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by