source:
issm/trunk-jpl/src/m/contrib/dlcheng/MeshOutlineToShp.m
      
      | Last change on this file was 25733, checked in by , 5 years ago | |
|---|---|
| File size: 463 bytes | |
| Rev | Line | |
|---|---|---|
| [25733] | 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.
    ![(please configure the [header_logo] section in trac.ini)](/trac/issm/chrome/common/trac_banner.png)
