source:
issm/trunk-jpl/src/m/contrib/dlcheng/MeshOutlineToShp.m@
25737
Last change on this file since 25737 was 25733, checked in by , 4 years ago | |
---|---|
File size: 463 bytes |
Line | |
---|---|
1 | function MeshOutlineToShp(md,shapefilename) |
2 | %MESHOUTLINETOSHP - export mesh outline to shp file |
3 | % |
4 | % Usage: |
5 | % MeshOutlineToShp(md,'Greenland.shp'); |
6 | |
7 | contours= struct([]); |
8 | for i=1:md.mesh.numberofvertices |
9 | if md.mesh.vertexonboundary(i) |
10 | contours(i).x = md.mesh.x(i); |
11 | contours(i).y = md.mesh.y(i); |
12 | contours(i).id = i; |
13 | contours(i).Geometry = 'Point'; |
14 | end |
15 | end |
16 | shpwrite(contours,shapefilename); |
Note:
See TracBrowser
for help on using the repository browser.