Changeset 21782 for issm/trunk-jpl/src/m/plot/kmlgroundoverlay.m
- Timestamp:
- 07/13/17 14:16:11 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/plot/kmlgroundoverlay.m
r14244 r21782 28 28 29 29 %figure out min and max for lat and long of this image: 30 west=min(md.mesh.long); 31 east=max(md.mesh.long); 32 south=min(md.mesh.lat); 33 north=max(md.mesh.lat); 30 if strcmpi(getfieldvalue(options,'coord',''),'latlon'), 31 %need to plot with option 'coord','latlon' 32 XLIM=xlim(); 33 YLIM=ylim(); 34 west=XLIM(1); 35 east=XLIM(2); 36 south=YLIM(1); 37 north=YLIM(2); 38 else 39 west=min(md.mesh.long); 40 east=max(md.mesh.long); 41 south=min(md.mesh.lat); 42 north=max(md.mesh.lat); 43 end 34 44 35 45 %print image at high resolution 36 export_fig([kmlroot '/' kmlimagename],'-transparent','-zbuffer'); %zbuffer to avoid "Bad data returned by HARDCOPY. Not calling IMWRITE" 46 %export_fig([kmlroot '/' kmlimagename],'-transparent','-zbuffer'); %zbuffer to avoid "Bad data returned by HARDCOPY. Not calling IMWRITE" 47 export_fig([kmlroot '/' kmlimagename],'-transparent'); 37 48 %printmodel([kmlroot '/' kmlimagename],kmlimagetype,'trim','on','resolution',kmlresolution,'margin','off','frame','off'); 38 49 … … 61 72 62 73 fclose(fid); 74 75 if strcmpi(getfieldvalue(options,'kmz','on'),'on') 76 disp('Converting to kmz...'); 77 system(['cat ' kmlroot '/' kmlfilename '| sed -e "s/' kmlimagename '\.png/files\/' kmlimagename '.png/g" > doc.kml']); 78 system('mkdir files'); 79 system(['mv ' kmlroot '/' kmlimagename '.png files/']); 80 system(['zip -r ' kmlfilename '.zip files doc.kml']); 81 system(['mv ' kmlfilename '.zip ' kmlfilename]); 82 system(['rm -rf files doc.kml']); 83 end
Note:
See TracChangeset
for help on using the changeset viewer.