Changeset 6473
- Timestamp:
- 11/02/10 11:40:50 (14 years ago)
- Location:
- issm/trunk/src/m/kml
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/kml/kml_part_edges.m
r6469 r6473 128 128 129 129 [icol,irow]=find(epart'==k); 130 if isempty(i col)130 if isempty(irow) 131 131 continue; 132 132 end -
issm/trunk/src/m/kml/kml_part_elems.m
r6469 r6473 123 123 for k=1:md.npart 124 124 125 % for each partition, find all the included elements and determine the 126 % perimeter (including those shared by another partition) 125 % for each partition, find all the included elements 127 126 128 127 [icol,irow]=find(epart'==k); 129 if isempty(i col)128 if isempty(irow) 130 129 continue; 131 130 end 132 131 irow=unique(irow); 133 132 elem=md.elements(irow,:); 134 nodecon=nodeconnectivity(elem,md.numberofgrids);135 [edgeper,elemper,iloop]=edgeperimeter(elem,nodecon);136 iloop(end+1)=size(edgeper,1)+1;137 133 138 134 % determine the data to be used for the colors (if any) … … 155 151 156 152 kplace=kml_placemark(); 157 if (length(iloop)-1 > 1) 158 kplace.name =sprintf('Partition %d (%d loops)',k,length(iloop)-1); 159 else 160 kplace.name =sprintf('Partition %d',k); 161 end 153 kplace.name =sprintf('Partition %d (%d elements)',k,size(elem,1)); 162 154 kplace.visibility=1; 163 155 if exist('pdata','var') … … 176 168 177 169 kmgeom=kml_multigeometry(); 178 kmgeom.geometry ={repmat(kml_polygon(),1, length(iloop)-1)};179 180 % loop over each loop of the perimeterfor the given partition181 182 for i=1: length(iloop)-1170 kmgeom.geometry ={repmat(kml_polygon(),1,size(elem,1))}; 171 172 % loop over each element for the given partition 173 174 for i=1:size(elem,1) 183 175 kpoly=kml_polygon(); 184 176 kpoly.extrude =1; … … 186 178 187 179 kring=kml_linearring(); 188 kring.coords =zeros( iloop(i+1)-iloop(i)+1,3);189 190 % loop over the element edges on the loop of the partition191 192 for j= iloop(i):iloop(i+1)-1193 [lat,long]=mapxy(md.x(e dgeper(j,1)),md.y(edgeper(j,1)),'s');194 kring.coords(j -iloop(i)+1,:)=[long lat alt];180 kring.coords =zeros(size(elem,2)+1,3); 181 182 % loop over the element nodes 183 184 for j=1:size(elem,2) 185 [lat,long]=mapxy(md.x(elem(i,j)),md.y(elem(i,j)),'s'); 186 kring.coords(j,:)=[long lat alt]; 195 187 end 196 188 kring.coords(end,:)=kring.coords(1,:); -
issm/trunk/src/m/kml/kml_partitions.m
r6469 r6473 129 129 130 130 [icol,irow]=find(epart'==k); 131 if isempty(i col)131 if isempty(irow) 132 132 continue; 133 133 end
Note:
See TracChangeset
for help on using the changeset viewer.