source: issm/oecreview/Archive/24684-25833/ISSM-24857-24858.diff@ 25834

Last change on this file since 25834 was 25834, checked in by Mathieu Morlighem, 4 years ago

CHG: added 24684-25833

File size: 2.0 KB
RevLine 
[25834]1Index: ../trunk-jpl/src/m/contrib/larour/proj2shpprj.m
2===================================================================
3--- ../trunk-jpl/src/m/contrib/larour/proj2shpprj.m (revision 24857)
4+++ ../trunk-jpl/src/m/contrib/larour/proj2shpprj.m (revision 24858)
5@@ -1,7 +1,11 @@
6 function proj2shpprj(filename,proj)
7
8+ %filename: does it have an extension? remove it.
9+ [path,name,ext] = fileparts(filename);
10+
11+ %Figure out central meridian and latitude of origin:
12 [lat,long]=projlatlong(proj);
13-
14- fid=fopen(filename,'w');
15- fprintf('PROJCS["Lambert_Azimuthal_Equal_Area",GEOGCS["GCS_WGS_1984",DATUM["D_unknown",SPHEROID["WGS84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["latitude_of_origin",%g],PARAMETER["central_meridian",%g],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1]]',lat,long);
16+
17+ fid=fopen([path '/' name '.prj'],'w');
18+ fprintf(fid,'PROJCS["Lambert_Azimuthal_Equal_Area",GEOGCS["GCS_WGS_1984",DATUM["D_unknown",SPHEROID["WGS84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["latitude_of_origin",%g],PARAMETER["central_meridian",%g],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1]]',lat,long);
19 fclose(fid);
20Index: ../trunk-jpl/src/m/contrib/larour/applyqgisstyle.m
21===================================================================
22--- ../trunk-jpl/src/m/contrib/larour/applyqgisstyle.m (nonexistent)
23+++ ../trunk-jpl/src/m/contrib/larour/applyqgisstyle.m (revision 24858)
24@@ -0,0 +1,17 @@
25+function applyqgisstyle(filename,type);
26+
27+ %Getting extension out:
28+ [path,name,ext]=fileparts(filename);
29+
30+ %New name:
31+ if isempty(path),
32+ newname=[name '.qml'];
33+ else
34+ newname=[path '/' name '.qml'];
35+ end
36+
37+ if strcmpi(type,'mesh'),
38+ system(['cp /Users/larour/issm-jpl/usr/larour/Qgis/Mesh.qml ' newname]);
39+ else
40+ error(['applyqgisstyle error message: ' type ' style not supported yet']);
41+ end
Note: See TracBrowser for help on using the repository browser.