source: issm/trunk-jpl/src/m/interp/export_geotif.m@ 17003

Last change on this file since 17003 was 17003, checked in by Eric.Larour, 11 years ago

CHG: export geotif

File size: 443 bytes
Line 
1function export_geotif(filename,ref)
2%EXPORT_GEOTIF - export geotiff
3%
4%
5% Usage: export_geotif('Articles/figures/figure','EPSG:3411');
6%
7
8
9 %first export the figure
10 export_fig([filename '.jpg']);
11
12 %call gdal on this:
13 system(sprintf('gdal_translate -a_srs %s -of GTiff -co "INTERLEAVE=PIXEL" -a_ullr %g %g %g %g %s.jpg %s.tif', ref, min(xlim), max(ylim),max(xlim),min(ylim),filename,filename));
14 system(['rm -rf ' filename '.jpg']);
15
16end
Note: See TracBrowser for help on using the repository browser.