@@ -40,7 +40,7 @@ function gridmaps(grids,outd,varargin)
40
40
%
41
41
% Author: F. Beauducel, C. Brunet, WEBOBS/IPGP
42
42
% Created: 2013-09-13 in Paris, France
43
- % Updated: 2021-05-19
43
+ % Updated: 2022-07-21
44
44
45
45
46
46
WO = readcfg ;
@@ -117,10 +117,11 @@ function gridmaps(grids,outd,varargin)
117
117
lwmajor = field2num(P ,' CONTOURLINES_MAJOR_LINEWIDTH' ,1 );
118
118
zerolevel = isok(P ,' CONTOURLINES_ZERO_LEVEL' ,0 );
119
119
convertopt = field2str(WO ,' CONVERT_COLORSPACE' ,' -colorspace sRGB' );
120
+ shading = field2str(P ,' SHADING' ,' light' );
120
121
feclair = field2num(P ,' COLOR_LIGHTENING' ,2 );
121
122
csat = field2num(P ,' COLOR_SATURATION' ,.8 );
122
123
zcut = field2num(P ,' ZCUT' ,0.1 );
123
- laz = field2num(P ,' LIGHT_AZIMUTH' ,45 );
124
+ laz = field2num(P ,' LIGHT_AZIMUTH' ,[- 45 , 45 ] );
124
125
lct = field2num(P ,' LIGHT_CONTRAST' ,1 );
125
126
if isfield(P ,' LANDCOLORMAP' ) && exist(P .LANDCOLORMAP ,' file' )
126
127
cmap = eval(P .LANDCOLORMAP );
@@ -139,7 +140,7 @@ function gridmaps(grids,outd,varargin)
139
140
end
140
141
demoptions = {' Interp' ,' Lake' ,' LakeZmin' ,0 ,' ZCut' ,zcut ,' Azimuth' ,laz , ...
141
142
' Contrast' ,lct ,' LandColor' ,cmap ,' SeaColor' ,sea ,' Watermark' ,feclair , ...
142
- ' Saturation' ,csat ,' latlon' ,' legend' ,' axisequal' ,' manual' };
143
+ ' Saturation' ,csat ,' latlon' ,' shading ' , shading , ' legend' ,' axisequal' ,' manual' };
143
144
144
145
% loads all needed grid's parameters & associated nodes
145
146
for g = 1 : length(grids )
@@ -192,7 +193,7 @@ function gridmaps(grids,outd,varargin)
192
193
s = split(grids{g },' .' );
193
194
G = GRIDS.(s{1 }).(s{2 });
194
195
% GRIDMAPS.rc SRTM1 option applies only if not defined in the PROC's configuration
195
- if isok(P ,' DEM_SRTM1' ) & (~isfield(G ,' DEM_SRTM1' ) || merge )
196
+ if isok(P ,' DEM_SRTM1' ) && (~isfield(G ,' DEM_SRTM1' ) || merge )
196
197
G.DEM_SRTM1 = ' Y' ;
197
198
end
198
199
if request
@@ -304,12 +305,12 @@ function gridmaps(grids,outd,varargin)
304
305
clrgb = [0 ,0 ,0 ];
305
306
end
306
307
if length(dz1 ) > 1
307
- [~ ,h ] = contour(x ,y ,z ,dz1 ,' -' , ' Color ' , clrgb );
308
- set(h ,' LineWidth' ,lwminor );
308
+ [~ ,h ] = contour(x ,y ,z ,dz1 ,' -' );
309
+ set(h ,' LineColor ' , clrgb , ' LineWidth' ,lwminor );
309
310
end
310
311
if length(dz0 ) > 1
311
- [cs ,h ] = contour(x ,y ,z ,dz0 ,' -' , ' Color ' , clrgb );
312
- set(h ,' LineWidth' ,lwmajor );
312
+ [cs ,h ] = contour(x ,y ,z ,dz0 ,' -' );
313
+ set(h ,' LineColor ' , clrgb , ' LineWidth' ,lwmajor );
313
314
if isok(P ,' CONTOURLINES_LABEL' )
314
315
clabel(cs ,h ,dz0 ,' Color' ,clrgb ,' FontSize' ,7 ,' FontWeight' ,' bold' ,' LabelSpacing' ,288 )
315
316
end
@@ -381,7 +382,8 @@ function gridmaps(grids,outd,varargin)
381
382
xylim = [get(gca ,' XLim' ),get(gca ,' YLim' )];
382
383
383
384
% copyright
384
- copyright = sprintf(' {\\ bf\\ copyright %s } - {%s } - %s / %s ' ,WO .COPYRIGHT ,strrep(grids{g },' _' ,' \_' ),demcopyright ,datestr(now ,0 ));
385
+ copyright = sprintf(' {\\ bf\\ copyright %s , %s } - {%s } - %s / %s ' ,num2roman(str2double(datestr(now ,' yyyy' ))), ...
386
+ WO .COPYRIGHT ,strrep(grids{g },' _' ,' \_' ),demcopyright ,datestr(now ,0 ));
385
387
axes(' Position' ,[pos(1 ),0 ,pos(3 ),pos(2 )])
386
388
axis([0 ,1 ,0 ,1 ]); axis off
387
389
text(.5 ,0 ,copyright ,' Color' ,.4 *[1 ,1 ,1 ],' FontSize' ,9 ,' HorizontalAlignment' ,' center' ,' VerticalAlignment' ,' bottom' )
@@ -437,7 +439,10 @@ function gridmaps(grids,outd,varargin)
437
439
txt = regexprep(sprintf(' %s : %s ' ,NN(gg ).alias{knn },NN(gg ).name{knn }),' "' ,' ' );
438
440
fprintf(fid ,' <AREA href="%s " title="%s " shape=circle coords="%d ,%d ,%d ">\n ' ,lnk ,txt ,x ,y ,r );
439
441
else
440
- txt = unicode2native(regexprep(sprintf(' <b>%s </b>: %s ' ,NN(gg ).alias{knn },NN(gg ).name{knn }),' "' ,' ' ),' utf-8' );
442
+ txt = regexprep(sprintf(' <b>%s </b>: %s ' ,NN(gg ).alias{knn },NN(gg ).name{knn }),' "' ,' ' );
443
+ try
444
+ txt = unicode2native(txt ,' UTF-8' );
445
+ end
441
446
txt = regexprep(char(txt ),' '' ' ,' \\'' ' );
442
447
fprintf(fid ,' <AREA href="%s " onMouseOut="nd()" onMouseOver="overlib(''%s'' )" shape=circle coords="%d ,%d ,%d ">\n ' ,lnk ,txt ,x ,y ,r );
443
448
end
0 commit comments