Changeset 17204
- Timestamp:
- 01/31/14 09:38:31 (11 years ago)
- Location:
- issm/trunk-jpl/src/m/shp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/shp/shpdisp.m
r16257 r17204 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 -
issm/trunk-jpl/src/m/shp/shpread.m
r16340 r17204 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). … … 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
Note:
See TracChangeset
for help on using the changeset viewer.