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
|
Rev | Line | |
---|
[16556] | 1 | Index: ../trunk-jpl/src/m/shp/shpread.m
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- ../trunk-jpl/src/m/shp/shpread.m (revision 16339)
|
---|
| 4 | +++ ../trunk-jpl/src/m/shp/shpread.m (revision 16340)
|
---|
| 5 | @@ -28,6 +28,7 @@
|
---|
| 6 | shp=shaperead(filename);
|
---|
| 7 |
|
---|
| 8 | Struct=struct([]);
|
---|
| 9 | +fields=fieldnames(shp);
|
---|
| 10 | for i=1:length(shp),
|
---|
| 11 | if strcmpi(shp(i).Geometry,'Polygon'),
|
---|
| 12 | x=shp(i).X'; y=shp(i).Y';
|
---|
| 13 | @@ -44,6 +45,12 @@
|
---|
| 14 | else
|
---|
| 15 | Struct(end).name='';
|
---|
| 16 | end
|
---|
| 17 | + for j=1:length(fields),
|
---|
| 18 | + field=fields{j};
|
---|
| 19 | + if ~(strcmpi(field,'X') | strcmpi(field,'Y') | strcmpi(field,'id')),
|
---|
| 20 | + Struct(end).(field)=shp(i).(field);
|
---|
| 21 | + end
|
---|
| 22 | + end
|
---|
| 23 | end
|
---|
| 24 | end
|
---|
| 25 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.