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