Changeset 18213
- Timestamp:
- 07/01/14 18:00:34 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/src/m/exp/exp2shp.m ¶
r18211 r18213 1 function exp2shp(shapefilename,expfilename )1 function exp2shp(shapefilename,expfilename,geometry) 2 2 %SHPWRITE - write a shape file from a contour structure 3 3 % 4 4 % Usage: 5 % exp2shp(shapefilename,expfilename )5 % exp2shp(shapefilename,expfilename,geometry) 6 6 % 7 7 % Example: 8 8 % exp2shp('domainoutline.shp','domainoutline.exp') 9 % exp2shp('domainoutline.shp','domainoutline.exp','Polygon') 10 % exp2shp('massfluxgate.shp','massfluxgate.exp','Line') 9 11 % 10 12 % See also SHPREAD, SHPWRITE, SHP2EXP … … 17 19 contours=struct([]); 18 20 for i=1:length(shp), 19 contours(i).Geometry='Polygon'; 21 if nargin < 3 22 if length(shp(1).x) == 1 23 geometry = 'Point'; 24 elseif length(shp(1).x) < 3 25 geometry = 'Line'; 26 else 27 geometry = 'Polygon'; 28 end 29 end 30 contours(i).Geometry=geometry; 20 31 contours(i).id=i; 21 32 contours(i).X=shp(i).x;
Note:
See TracChangeset
for help on using the changeset viewer.