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

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

CHG: added 24684-25833

File size: 2.0 KB
  • ../trunk-jpl/src/m/contrib/larour/proj2shpprj.m

     
    11function proj2shpprj(filename,proj)
    22
     3        %filename: does it have an extension? remove it.
     4        [path,name,ext] = fileparts(filename);
     5
     6        %Figure out central meridian and latitude of origin:
    37        [lat,long]=projlatlong(proj);
    4        
    5         fid=fopen(filename,'w');
    6         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);
     8
     9        fid=fopen([path '/' name '.prj'],'w');
     10        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);
    711        fclose(fid);
  • ../trunk-jpl/src/m/contrib/larour/applyqgisstyle.m

     
     1function applyqgisstyle(filename,type);
     2
     3        %Getting extension out:
     4        [path,name,ext]=fileparts(filename);
     5
     6        %New name:
     7        if isempty(path),
     8                newname=[name '.qml'];
     9        else
     10                newname=[path '/' name '.qml'];
     11        end
     12
     13        if strcmpi(type,'mesh'),
     14                system(['cp /Users/larour/issm-jpl/usr/larour/Qgis/Mesh.qml ' newname]);
     15        else
     16                error(['applyqgisstyle error message: ' type ' style not supported yet']);
     17        end
Note: See TracBrowser for help on using the repository browser.