Changeset 7342 for issm/trunk/src/m/kml/kml_unsh_edges.m
- Timestamp:
- 02/04/11 14:43:13 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/kml/kml_unsh_edges.m
r7132 r7342 11 11 % 12 12 % and the optional input is: 13 % latsgn (numeric, +1/-1 for north/south latitude) 13 14 % alt (numeric, altitude for polygons, default 10000) 14 15 % prtplt (char, 'off'/'no' for partition edge plot) … … 40 41 if ischar(varargin{iarg}) 41 42 if ~isempty(strmatch(varargin{iarg},... 42 {' alt','prtplt'},...43 {'latsgn','alt','prtplt'},... 43 44 'exact')) 44 45 eval([varargin{iarg} '=varargin{iarg+1};']); … … 51 52 end 52 53 iarg=iarg+2; 54 end 55 56 if isempty(md.lat) || ((numel(md.lat) == 1) && isnan(md.lat)) || ... 57 isempty(md.long) || ((numel(md.long) == 1) && isnan(md.long)) 58 if ~exist('latsgn') 59 error(['Missing ''latsgn'' parameter to calculate missing lat/long data.']); 60 elseif (abs(latsgn) ~= 1) 61 error(['Incorrect latsgn=' num2str(latsgn) ' parameter to calculate missing lat/long data.']); 62 else 63 display('Converting x/y data to lat/long data.'); 64 [md.lat,md.long]=xy2ll(md.x,md.y,latsgn); 65 end 53 66 end 54 67 … … 91 104 92 105 for j=1:2 93 [lat,long]=xy2ll(md.x(edgeuns(i,j)),md.y(edgeuns(i,j)),-1); 94 kline.coords(j,:)=[long lat alt]; 106 kline.coords(j,:)=[md.long(edgeuns(i,j)) md.lat(edgeuns(i,j)) alt]; 95 107 end 96 108
Note:
See TracChangeset
for help on using the changeset viewer.