source:
issm/oecreview/Archive/20545-21336/ISSM-21105-21106.diff@
21337
Last change on this file since 21337 was 21337, checked in by , 8 years ago | |
---|---|
File size: 13.6 KB |
-
../trunk-jpl/src/wrappers/matlab/Makefile.am
51 51 InterpFromMeshToGrid_matlab.la\ 52 52 InterpFromMesh2d_matlab.la\ 53 53 IssmConfig_matlab.la\ 54 Ll2xy_matlab.la\55 54 NodeConnectivity_matlab.la\ 56 55 M1qn3_matlab.la\ 57 56 MeshPartition_matlab.la\ … … 60 59 PropagateFlagsFromConnectivity_matlab.la\ 61 60 TriMesh_matlab.la\ 62 61 TriMeshProcessRifts_matlab.la\ 63 Scotch_matlab.la\ 64 Xy2ll_matlab.la 62 Scotch_matlab.la 65 63 66 64 if CHACO 67 65 lib_LTLIBRARIES += Chaco_matlab.la … … 69 67 if KRIGING 70 68 lib_LTLIBRARIES += Kriging_matlab.la 71 69 endif 72 if 70 ifKML 73 71 lib_LTLIBRARIES += ShpRead_matlab.la 74 72 endif 75 73 #}}} … … 194 192 IssmConfig_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 195 193 IssmConfig_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) 196 194 197 Xy2ll_matlab_la_SOURCES = ../Xy2ll/Xy2ll.cpp198 Xy2ll_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}199 Xy2ll_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)200 201 Ll2xy_matlab_la_SOURCES = ../Ll2xy/Ll2xy.cpp202 Ll2xy_matlab_la_CXXFLAGS = ${AM_CXXFLAGS}203 Ll2xy_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB)204 205 195 ExpSimplify_matlab_la_SOURCES = ../ExpSimplify/ExpSimplify.cpp 206 196 ExpSimplify_matlab_la_CXXFLAGS = ${AM_CXXFLAGS} 207 197 ExpSimplify_matlab_la_LIBADD = ${deps} $(MPILIB) $(PETSCLIB) $(GSLLIB) $(PROJ4LIB) -
../trunk-jpl/src/m/modules/Xy2ll.m
1 function [lat,lon] = Xy2ll(varargin);2 %XY2LL - x/y to lat/long coordinate transformation module:3 %4 % This module transforms x/y to lat/long coordinates.5 %6 % Usage:7 % [lat,lon]=Xy2ll(x,y,sgn,'param name',param,...);8 %9 % x: x coordinates (double vector)10 % y: y coordinates (double vector)11 % sgn: sign for hemisphere (double, +1 (north) or -1 (south))12 %13 % central_meridian: central meridian (double, optional, but must specify with sp)14 % standard_parallel: standard parallel (double, optional, but must specify with cm)15 %16 % lat: latitude coordinates (double vector)17 % lon: longitude coordinates (double vector)18 %19 % Examples:20 % [lat,lon]=Xy2ll(x,y, 1);21 % [lat,lon]=Xy2ll(x,y, 1,'central_meridian',45,'standard_parallel',70);22 % [lat,lon]=Xy2ll(x,y,-1,'central_meridian', 0,'standard_parallel',71);23 24 % Check usage25 if nargout~=2 && nargin~=3 && nargin~=726 help Xy2ll27 error('Wrong usage (see above)');28 end29 30 % Call mex module31 [lat,lon]=Xy2ll_matlab(varargin{:}); -
../trunk-jpl/src/m/modules/KMLMeshWrite.m
1 function ierror = KMLMeshWrite(name,notes,elem,nodecon,lat,long,part,data,cmap,kmlfile);2 % KMLMESHWRITE - KML mesh writer module:3 %4 % This module writes the mesh of a model as KML polygons into the specified KML file.5 %6 % Usage:7 % ierror=KMLMeshWrite(name,notes,elem,nodecon,lat,long,part,data,cmap,kmlfile);8 %9 % name: model name (string, may be empty)10 % notes: model notes (string or cell array of strings, may be empty)11 % elem: elements (double array)12 % nodecon: nodal connectivity array (double array, may be empty)13 % lat: nodal latititudes (double vector)14 % long: nodal longitudes (double vector)15 % part: nodal partitions (double vector, may be empty)16 % data: nodal or element data (double vector, may be empty)17 % cmap: color map (double nx3 array, may be empty)18 % kmlfile: KML file name (string)19 %20 % ierror: error flag (double, non-zero for error)21 %22 % Example:23 % KMLMeshWrite(md.name,md.notes,md.elements,md.nodeconnectivity,md.lat,md.long,md.part,md.fm_criterion,options.cmap,filekml);24 25 % Check usage26 if nargin~=1027 help KMLMeshWrite28 error('Wrong usage (see above)');29 end30 31 % Call mex module32 ierror = KMLMeshWrite_matlab(name,notes,elem,nodecon,lat,long,part,data,cmap,kmlfile); -
../trunk-jpl/src/m/modules/KMLOverlay.m
1 function ierror = KMLOverlay(varargin);2 % KMLOverlay - KML file overlay module:3 %4 % This module reads a list of image files and writes a KML or KMZ overlay file.5 %6 % Usage:7 % ierror=KMLOverlay(kmlfile,'param name',param,...);8 %9 % kmlfile: KML or KMZ file name (string)10 %11 % lataxis: latitude axis (double vector [south north], required)12 % longaxis: longitude axis (double vector [west east], required)13 % images: relative or http image file names (string or array of strings or cell array of strings, required)14 % zip: flag to zip the doc.kml and image files into kmzfile (double, non-zero for kmz)15 %16 % ierror: error flag (double, non-zero for error)17 %18 % Example:19 % KMLOverlay(kmlfile,'lataxis',[south north],'longaxis',[west east],'images',{'file1.png','http://issm/file2.png'},'zip',1);20 21 % Check usage22 if nargin~=7 && nargin~=923 help KMLOverlay24 error('Wrong usage (see above)');25 end26 27 % Call mex module28 switch nargin29 case 730 ierror=KMLOverlay_matlab(varargin{1},varargin{2},varargin{3},varargin{4},varargin{5},varargin{6},varargin{7});31 case 932 ierror=KMLOverlay_matlab(varargin{1},varargin{2},varargin{3},varargin{4},varargin{5},varargin{6},varargin{7},varargin{8},varargin{9});33 otherwise34 ierror=-1; % ERROR (non-zero)35 end -
../trunk-jpl/src/m/modules/Ll2xy.m
1 function [x,y] = Ll2xy(varargin);2 %LL2XY - lat/long to x/y coordinate transformation module:3 %4 % This module transforms lat/long to x/y coordinates.5 %6 % Usage:7 % [x,y]=Ll2xy(lat,lon,sgn,'param name',param,...);8 %9 % lat latitude coordinates (double vector)10 % lon longitude coordinates (double vector)11 % sgn sign for hemisphere (double, +1 (north) or -1 (south))12 %13 % central_meridian central meridian (double, optional, but must specify with sp)14 % standard_parallel standard parallel (double, optional, but must specify with cm)15 %16 % x x coordinates (double vector)17 % y y coordinates (double vector)18 %19 % Examples:20 % [x,y]=Ll2xy(lat,lon, 1);21 % [x,y]=Ll2xy(lat,lon, 1,'central_meridian',45,'standard_parallel',70);22 % [x,y]=Ll2xy(lat,lon,-1,'central_meridian', 0,'standard_parallel',71);23 24 % Check usage25 if nargin~=3 && nargin~=726 help Ll2xy27 error('Wrong usage (see above)');28 end29 30 % Call mex module31 switch nargin32 case 333 [x,y]=Ll2xy_matlab(varargin{1},varargin{2},varargin{3});34 case 735 [x,y]=Ll2xy_matlab(varargin{1},varargin{2},varargin{3},varargin{4},varargin{5},varargin{6},varargin{7});36 otherwise37 error(['Error in Ll2xy', '']);38 end39 40 -
../trunk-jpl/src/m/modules/KMLFileRead.m
1 function [ierror] = KMLFileRead(varargin);2 %KMLFILEREAD - KML File Reader module3 %4 % This module reads a KML File.5 %6 % Usage:7 % [ierror]=KMLFileRead(kmlfile,'param name',param,...);8 %9 % kmlfile: file name of kml file to be read (char)10 % echo: echo command (char, optional, 'off'/'on')11 % deepecho: deep echo command (char, optional, 'off'/'stdout'/kmlfile12 % write: write command (char, optiona, 'off'/'stdout'/kmlfile13 %14 % ierror: return code (non-zero for error)15 %16 % Examples:17 % [ierror]=KMLFileRead('file.kml','deepecho','on');18 % [ierror]=KMLFileRead('filin.kml','echo','on','write','filout.kml');19 20 % Check usage21 if nargin~=1 && nargin~=3 && nargin~=5 && nargin~=722 help KMLFileRead23 error('Wrong usage (see above)');24 end25 26 % Call mex module27 switch nargin28 case 129 [ierror]=KMLFileRead_matlab(varargin{1});30 case 331 [ierror]=KMLFileRead_matlab(varargin{1},varargin{2},varargin{3});32 case 533 [ierror]=KMLFileRead_matlab(varargin{1},varargin{2},varargin{3},varargin{4},varargin{5});34 case 735 [ierror]=KMLFileRead_matlab(varargin{1},varargin{2},varargin{3},varargin{4},varargin{5},varargin{6},varargin{7});36 otherwise37 [ierror]=['Error using KMLFileRead'];38 end39 -
../trunk-jpl/src/m/modules/Shp2Kml.m
1 function [ret]=Shp2Kml(varargin);2 % SHP2KML - shp to kml file conversion module:3 %4 % This module converts a file from shp to kml format.5 %6 % Usage:7 % [ret]=Shp2Kml(filshp,filkml,sgn,'param name',param,...);8 %9 % filshp: file name of shp file to be read (char, extension optional)10 % filkml: file name of kml file to be written (char)11 % sgn: sign for hemisphere (double, +1 (north) -1 (south) or 0 (no translation))12 %13 % central_meridian: central meridian (double, optional, but must specify with sp)14 % standard_parallel: standard parallel (double, optional, but must specify with cm)15 %16 % ret: return code (non-zero for warning)17 %18 % Examples:19 % [ret]=Shp2Kml('file.shp','file.kml', 0);20 % [ret]=Shp2Kml('file.shp','file.kml', 1,'central_meridian',45,'standard_parallel',70);21 % [ret]=Shp2Kml('file.shp','file.kml',-1,'central_meridian', 0,'standard_parallel',71);22 23 % Check usage24 if nargin~=3 && nargin~=725 help Shp2Kml26 error('Wrong usage (see above)');27 end28 29 % Call mex module30 [ret]=Shp2Kml_matlab(varargin{:}); -
../trunk-jpl/src/m/modules/Exp2Kml.m
1 function [ret] = Exp2Kml(varargin);2 %EXP2KML - Converts a file from exp to kml format3 %4 % Usage:5 % [ret]=Exp2Kml(filexp,filkml,sgn,'param nam',param,...);6 %7 % filexp: file name of the exp file to be read (string)8 % filkml: file name of the kml file to be written (string)9 % sgn: sign for hemisphere (double, +1 (north) or -1 (south))10 %11 % central_meridian: central meridian (double, optional, but must specify with sp)12 % standard_parallel: standard parallel (double, optional, but must specify with cm)13 % holes: flag for treatment of multiple profiles (string, optional, 'yes' for holes)14 %15 % ret: return code (non-zero for warning)16 %17 % Examples:18 % [ret]=Exp2Kml('file.exp','file.kml', 1);19 % [ret]=Exp2Kml('file.exp','file.kml', 1,'central_meridian',45,'standard_parallel',70,'holes','yes');20 % [ret]=Exp2Kml('file.exp','file.kml',-1,'central_meridian',0, 'standard_parallel',71,'holes','yes');21 22 % Check usage23 if nargin~=3 && nargin~=7 && nargin~=924 help Exp2Kml25 error('Wrong usage (see above)');26 end27 28 % Call mex module depending on number of arguments29 switch nargin30 case 331 [ret]=Exp2Kml_matlab(varargin{1},varargin{2},varargin{3});32 case 733 [ret]=Exp2Kml_matlab(varargin{1},varargin{2},varargin{3},varargin{4},varargin{5},varargin{6},varargin{7});34 case 935 [ret]=Exp2Kml_matlab(varargin{1},varargin{2},varargin{3},varargin{4},varargin{5},varargin{6},varargin{7},varargin{8},varargin{9});36 otherwise37 error(['Exp2Kml not supported yet']);38 end39 -
../trunk-jpl/src/m/modules/Kml2Exp.m
1 function [ret] = Kml2Exp(varargin);2 % KML2EXP - kml to exp file conversion module:3 %4 % This module converts a file from kml to exp format.5 %6 % Usage:7 % [ret]=Kml2Exp(filexp,filkml,sgn,'param name',param,...);8 %9 % filkml: file name of kml file to be read (char)10 % filexp: file name of exp file to be written (char)11 % sgn: sign for hemisphere (double, +1 (north) or -1 (south))12 %13 % central_meridian: central meridian (double, optional, but must specify with sp)14 % standard_parallel: standard parallel (double, optional, but must specify with cm)15 %16 % ret: return code (non-zero for warning)17 %18 % Examples:19 % [ret]=Kml2Exp('file.kml','file.exp', 1);20 % [ret]=Kml2Exp('file.kml','file.exp', 1,'central_meridian',45,'standard_parallel',70);21 % [ret]=Kml2Exp('file.kml','file.exp',-1,'central_meridian', 0,'standard_parallel',71);22 23 % Check usage24 if nargin~=3 && nargin~=725 help Kml2Exp26 error('Wrong usage (see above)');27 end28 29 % Call mex module30 switch nargin31 case 332 [ret]=Kml2Exp_matlab(varargin{1},varargin{2},varargin{3});33 case 734 [ret]=Kml2Exp_matlab(varargin{1},varargin{2},varargin{3},varargin{4},varargin{5},varargin{6},varargin{7});35 otherwise36 [ret]=['Kml2Exp error'];37 end38
Note:
See TracBrowser
for help on using the repository browser.