WMSREAD - Blank Map Returned

2 views (last 30 days)
Davide Oscar
Davide Oscar on 26 Jul 2014
Commented: Geoff Hayes on 26 Jul 2014
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 Comment
Geoff Hayes
Geoff Hayes on 26 Jul 2014
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.

Sign in to comment.

Answers (0)

Tags

Products

Community Treasure Hunt

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

Start Hunting!