source:
issm/oecreview/Archive/14312-15392/ISSM-15148-15149.diff@
15393
Last change on this file since 15393 was 15393, checked in by , 12 years ago | |
---|---|
File size: 2.8 KB |
-
TabularUnified ../trunk-jpl/src/m/plot/plot_googlemaps.m
15 15 error('buildgridded error message: gridded not supported for 3d meshes, project on a layer'); 16 16 end 17 17 18 if ~any(isnan(md.radaroverlay.x )) & ~any(isnan(md.radaroverlay.y)) & ~any(isnan(md.radaroverlay.pwr)) &...19 size(md.radaroverlay.pwr,3)==3 & all(size(md.radaroverlay.x)==size(md.radaroverlay.pwr)),18 if ~any(isnan(md.radaroverlay.x(:))) & ~any(isnan(md.radaroverlay.y(:))) & ~any(isnan(md.radaroverlay.pwr(:))) ... 19 & size(md.radaroverlay.pwr,3)==3 & size(md.radaroverlay.x,2)==size(md.radaroverlay.pwr,2), 20 20 disp('plot_googlemaps info: the RGB image held by the model is being used'); 21 21 else 22 22 disp('Extracting image from Google maps...'); … … 81 81 if ~isnan(data_min), 82 82 options=changefieldvalue(options,'caxis',[data_min data_max]); % force caxis so that the colorbar is ready 83 83 end 84 options=addfielddefault(options,'xlim',xlim); % default xlim85 options=addfielddefault(options,'ylim',ylim); % default ylim86 84 options=addfielddefault(options,'axis','xy equal off'); % default axis 87 85 applyoptions(md,data,options); 88 86 end -
TabularUnified ../trunk-jpl/src/m/plot/googlemaps.m
2 2 %GOOGLEMAPS - Extract image from Google maps for given region 3 3 % 4 4 % Usage: 5 % md = googlemaps(md) 5 6 % md = googlemaps(md,ullat,ullon,lrlat,lrlon) 6 7 % md = googlemaps(md,ullat,ullon,lrlat,lrlon,options) 7 8 % … … 12 13 % - zoom: zoom level, between 1 and 21 (default dynamically calculated) 13 14 14 15 %Parse inputs 15 if nargin<5, 16 help googlemaps 17 error('Wrong usage'); 18 elseif nargin==5, 16 if nargin<=5, 19 17 options=pairoptions; 20 18 else 21 19 options=varargin{:}; … … 23 21 options=pairoptions(varargin{:}); 24 22 end 25 23 end 24 if nargin==1, 25 %Get xlim and ylim (used to extract Google maps image) 26 xlim=getfieldvalue(options,'xlim',[min(md.mesh.x) max(md.mesh.x)]); 27 ylim=getfieldvalue(options,'ylim',[min(md.mesh.y) max(md.mesh.y)]); 28 [latlist lonlist]= xy2ll(... 29 [linspace(xlim(1),xlim(2),100) linspace(xlim(2),xlim(2),100) linspace(xlim(2),xlim(1),100) linspace(xlim(1),xlim(1),100)],... 30 [linspace(ylim(1),ylim(1),100) linspace(ylim(1),ylim(2),100) linspace(ylim(2),ylim(2),100) linspace(ylim(2),ylim(1),100)],... 31 +1,45,70); 26 32 33 %Image corners in lat/long 34 ullat = max(latlist); ullon = min(lonlist); 35 lrlat = min(latlist); lrlon = max(lonlist); 36 elseif nargin>1 & nargin<5, 37 help googlemaps 38 error('Wrong usage'); 39 end 40 27 41 %Find optimal zoom 28 42 if exist(options,'zoom'), 29 43 zoom = getfieldvalue(options,'zoom');
Note:
See TracBrowser
for help on using the repository browser.