⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 polyjoin.m

📁 麻省理工学院的人工智能工具箱,很珍贵,希望对大家有用!
💻 M
字号:
function [lat2,lon2] = polyjoin(latcells,loncells)
% POLYJOIN convert polygon segments from cell array to vector format
% 
% [lat2,lon2] = POLYJOIN(latcells,loncells) converts polygons from cell
% array format to vector format. In cell array format, each element of 
% the cell array is a separate polygon. Each polygon may consist of an 
% outer contour followed by holes separated with NaNs. In vector format, 
% each vector may contain multiple faces separated by NaNs. There is no
% distinction between outer contours and holes.
%
% See also POLYSPLIT, POLYBOOL, POLYCUT

%  Written by: W. Stumpf
%  Copyright 1996-2002 Systems Planning and Analysis, Inc. and The MathWorks, Inc.
%  $Revision: 1.4 $    $Date: 2002/03/20 21:26:08 $

if nargin<2, error('Incorrect number of input arguments.'), end

if ~iscell(latcells) | ~iscell(loncells)
	error('Inputs must be cell arrays.')
end

if isempty(latcells);

   [lat2,lon2] = deal([],[]);
   return
   
else
   
   [lat2,lon2] = deal(latcells{1},loncells{1});
   
end

for i=2:length(latcells)
   [lat2,lon2] = deal([lat2;NaN;latcells{i}], [lon2;NaN;loncells{i}]);
end


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -