Changeset 19183


Ignore:
Timestamp:
03/06/15 10:08:22 (10 years ago)
Author:
Eric.Larour
Message:

CHG: added processing of Line

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/shp/shpread.m

    r17204 r19183  
    5555                end
    5656        end
     57       
     58        if strcmpi(shp(i).Geometry,'Line'),
     59                x=shp(i).X'; y=shp(i).Y';
     60                ids=find(isnan(x));
     61                x(ids)=[]; y(ids)=[];
     62
     63                Struct(end+1).x=x;
     64                Struct(end).y=y;
     65                Struct(end).nods=length(x);
     66                Struct(end).density=1;
     67                Struct(end).closed=1;
     68                if isfield(shp,'id'),
     69                        Struct(end).name=num2str(shp(i).id);
     70                else
     71                        Struct(end).name='';
     72                end
     73                for j=1:length(fields),
     74                        field=fields{j};
     75                        if ~(strcmpi(field,'X') | strcmpi(field,'Y') | strcmpi(field,'id')),
     76                                Struct(end).(field)=shp(i).(field);
     77                        end
     78                end
     79        end
     80
    5781
    5882        if strcmpi(shp(i).Geometry,'Point'),
Note: See TracChangeset for help on using the changeset viewer.