union of polyshapes, problem with collinearity
    조회 수: 5 (최근 30일)
  
       이전 댓글 표시
    
Hello,
I have 15 polygons (of streets) that I can merge into one using the union function.
But if I want to unite only a few of them (that are close to each other), I get: 
Error using polyshape/parseCollinear (line 946)
Parameter name must be 'KeepCollinearPoints'.
Error in polyshape/parseIntersectUnionArgs (line 973)
                    collinear =
                    polyshape.parseCollinear(varargin{next_inp:end});
Error in polyshape/union (line 42)
[has_clip, collinear] = polyshape.parseIntersectUnionArgs(false,
varargin{:});
Unfortunately, I don't really understand what MatLAB wants me to do to get my unified polygon groups.
Ah, and if polygons are collinear, I'd like to keep those collinear points.
Thank you!
댓글 수: 2
  Matt J
      
      
 2021년 5월 23일
				I suggest you attach the arguments to your call to union() in a .mat file, so the community can explore the problem.
채택된 답변
  Matt J
      
      
 2021년 5월 23일
        
      편집: Matt J
      
      
 2021년 5월 23일
  
      You just had a comma separated list in there by accident. The polyshapes must be given to union() as a vector.
load(websave('t','https://www.mathworks.com/matlabcentral/answers/uploaded_files/627388/streets_185.mat'));
A=union([Streetshape_185.L2{1,1}{:,1}],'KeepCollinearPoints',true)
plot(A)
추가 답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Elementary Polygons에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


