source:
issm/oecreview/Archive/16554-17801/ISSM-17203-17204.diff@
17802
Last change on this file since 17802 was 17802, checked in by , 11 years ago | |
---|---|
File size: 2.1 KB |
-
../trunk-jpl/src/m/shp/shpread.m
5 5 % fields x and y corresponding to the coordinates, one for the filename of 6 6 % the shp file, for the density, for the nodes, and a field closed to 7 7 % indicate if the domain is closed. 8 % If this initial shapefile is point only, the fields closed and 9 % points are ommited 8 10 % The first argument is the .shp file to be read and the second one (optional) 9 11 % indicates if the last point shall be read (1 to read it, 0 not to). 10 12 % … … 52 54 end 53 55 end 54 56 end 57 58 if strcmpi(shp(i).Geometry,'Point'), 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).density=1; 66 if isfield(shp,'id'), 67 Struct(end).name=num2str(shp(i).id); 68 else 69 Struct(end).name=''; 70 end 71 for j=1:length(fields), 72 field=fields{j}; 73 if ~(strcmpi(field,'X') | strcmpi(field,'Y') | strcmpi(field,'id')), 74 Struct(end).(field)=shp(i).(field); 75 end 76 end 77 end 55 78 end 56 79 57 80 end -
../trunk-jpl/src/m/shp/shpdisp.m
44 44 45 45 figure(figurenumber),hold on 46 46 for i=1:length(domain), 47 if (isnumeric(linestyle)) 48 plot(domain(i).x*unitmultiplier,domain(i).y*unitmultiplier,'Color',linestyle,'linewidth',linewidth); 47 if(isfield(domain,'nods')) 48 if (isnumeric(linestyle)) 49 plot(domain(i).x*unitmultiplier,domain(i).y*unitmultiplier,'Color',linestyle,'linewidth',linewidth); 50 else 51 plot(domain(i).x*unitmultiplier,domain(i).y*unitmultiplier,linestyle,'linewidth',linewidth); 52 end 49 53 else 50 plot(domain(i).x*unitmultiplier,domain(i).y*unitmultiplier, linestyle,'linewidth',linewidth);54 plot(domain(i).x*unitmultiplier,domain(i).y*unitmultiplier,'ro','MarkerSize',5); 51 55 end 56 52 57 end
Note:
See TracBrowser
for help on using the repository browser.