WMSREAD - Blank Map Returned

2 visualizzazioni (ultimi 30 giorni)
Davide Oscar
Davide Oscar il 26 Lug 2014
Commentato: Geoff Hayes il 26 Lug 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 Commento
Geoff Hayes
Geoff Hayes il 26 Lug 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.

Accedi per commentare.

Risposte (0)

Tag

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by