Changeset 21369


Ignore:
Timestamp:
11/12/16 19:33:34 (8 years ago)
Author:
Eric.Larour
Message:

CHG: shpread: new ability to invert profile. shpwrite: added line support.

Location:
issm/branches/trunk-larour-NatGeoScience2016/src/m/shp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/branches/trunk-larour-NatGeoScience2016/src/m/shp/shpread.m

    r19183 r21369  
    1 function Struct=shpread(filename)
     1function Struct=shpread(filename,varargin)
    22%SHPREAD - read a shape file and build a Structure
    33%
     
    1818%
    1919%   See also EXPDOC, EXPWRITEASVERTICES
     20
     21%recover options
     22options=pairoptions(varargin{:});
    2023
    2124%some checks
     
    102105end
    103106
     107invert=getfieldvalue(options,'invert',0);
     108if invert,
     109        for i=1:length(Struct),
     110                Struct(i).x=flipud(Struct(i).x);
     111                Struct(i).y=flipud(Struct(i).y);
     112        end
    104113end
     114
     115end
  • issm/branches/trunk-larour-NatGeoScience2016/src/m/shp/shpwrite.m

    r16718 r21369  
    1818        if strcmpi(shp(i).Geometry,'Point'),
    1919                contours(i).Geometry='Point';
    20         else strcmpi(shp(i).Geometry,'Polygon'),
     20        elseif strcmpi(shp(i).Geometry,'Polygon'),
    2121                contours(i).Geometry='Polygon';
     22        elseif strcmpi(shp(i).Geometry,'Line'),
     23                contours(i).Geometry='Line';
    2224        end
    2325        contours(i).id=i;
Note: See TracChangeset for help on using the changeset viewer.