| Contents | Index |
Bound size of raster map
mapRequest = boundImageSize(mapRequest, imageLength)
mapRequest = boundImageSize(mapRequest, imageLength) bounds the size of the raster map based on the scalar imageLength. The scalar mapRequest is a WMSMapRequest object. The double imageLength indicates the length in pixels for the row (ImageHeight) or column (ImageWidth) dimension. The boundImageSize method calculates the row or column dimension length by using the aspect ratio of the Latlim and Lonlim properties or the aspect ratio of the XLim and YLim properties, if they are set.
The boundImageSize method measures image dimensions in geographic or map coordinates. The method sets the longest image dimension to imageLength, and the shortest to the nearest integer value that preserves the aspect ratio, without changing the coordinate limits. The maximum value of the MaximumHeight and MaximumWidth properties becomes the maximum value of imageLength.
Read and display a composite of multiple layers representing the EGM96 geopotential model of the Earth, coastlines, and national boundaries from the NASA Globe Visualization server. The rendered map has a spatial resolution of 0.5 degree.
vizglobe = wmsfind('viz.globe', 'SearchField', 'serverurl');
coastlines = vizglobe.refine('coastline');
national_boundaries = vizglobe.refine('national*bound');
base_layer = vizglobe.refine('egm96');
layers = [base_layer;coastlines;national_boundaries];
request = WMSMapRequest(layers);
request.Transparent = true;
request = request.boundImageSize(720);
overlayImage = request.Server.getMap(request.RequestURL);
figure
worldmap('world')
geoshow(overlayImage, request.RasterRef);
title(base_layer.LayerTitle)

Compare the map with the contoured data from 'geoid.mat'.
geoid = load('geoid');
coast = load('coast');
figure
worldmap('world')
contourfm(geoid.geoid, geoid.geoidrefvec, 15)
geoshow(coast.lat, coast.long)
title({'EGM96 Contoured Data', '(geoid.mat)'})


Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |