source:
issm/oecreview/Archive/21337-21723/ISSM-21651-21652.diff@
21726
Last change on this file since 21726 was 21726, checked in by , 8 years ago | |
---|---|
File size: 1.4 KB |
-
../trunk-jpl/src/m/exp/exp2shp.m
1 function exp2shp( shapefilename,expfilename,geometry)1 function exp2shp(expfilename,shpfilename,geometry) 2 2 %SHPWRITE - write a shape file from a contour structure 3 3 % 4 4 % Usage: 5 % exp2shp( shapefilename,expfilename,geometry)5 % exp2shp(expfilename,shpfilename,geometry) 6 6 % 7 7 % Example: 8 % exp2shp('domainoutline. shp','domainoutline.exp')9 % exp2shp('domainoutline. shp','domainoutline.exp','Polygon')10 % exp2shp('massfluxgate. shp','massfluxgate.exp','Line')8 % exp2shp('domainoutline.exp','domainoutline.shp') 9 % exp2shp('domainoutline.exp','domainoutline.shp','Polygon') 10 % exp2shp('massfluxgate.exp','massfluxgate.shp','Line') 11 11 % 12 12 % See also SHPREAD, SHPWRITE, SHP2EXP 13 13 14 %check file extensions 15 [pathstr,name,ext] = fileparts(shpfilename); 16 if ~strcmp(ext,'.shp'), 17 error(['Shapefile ' shpfilename ' does not have an extension .shp']); 18 end 19 20 [pathstr,name,ext] = fileparts(expfilename); 21 if ~strcmp(ext,'.exp'), 22 error(['Exp file ' expfilename ' does not have an extension .exp']); 23 end 24 14 25 shp=expread(expfilename); 15 26 16 27 %initialize number of profile … … 33 44 contours(i).Y=shp(i).y; 34 45 end 35 46 36 shapewrite(contours,shapefilename); 37 end 47 shapewrite(contours,shpfilename);
Note:
See TracBrowser
for help on using the repository browser.