Line | |
---|
1 | function 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 |
|
---|
16 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.