source: issm/oecreview/Archive/16133-16554/ISSM-16339-16340.diff@ 16556

Last change on this file since 16556 was 16556, checked in by Mathieu Morlighem, 11 years ago

NEW: added Archive/16133-16554

File size: 667 bytes
  • TabularUnified ../trunk-jpl/src/m/shp/shpread.m

     
    2828shp=shaperead(filename);
    2929
    3030Struct=struct([]);
     31fields=fieldnames(shp);
    3132for i=1:length(shp),
    3233        if strcmpi(shp(i).Geometry,'Polygon'),
    3334                x=shp(i).X'; y=shp(i).Y';
     
    4445                else
    4546                        Struct(end).name='';
    4647                end
     48                for j=1:length(fields),
     49                        field=fields{j};
     50                        if ~(strcmpi(field,'X') | strcmpi(field,'Y') | strcmpi(field,'id')),
     51                                Struct(end).(field)=shp(i).(field);
     52                        end
     53                end
    4754        end
    4855end
    4956
Note: See TracBrowser for help on using the repository browser.