FInd area of overlapping circles using circlem
9 次查看(过去 30 天)
显示 更早的评论
I am trying to find the area of intersecting circles using circlem. I use the code below but there is no intersection between the two circles. Does anyone have any advice on how to calculate the area?
figure
ax = usamap('conus');
set(ax, 'Visible', 'off')
latlim = getm(ax, 'MapLatLimit');
lonlim = getm(ax, 'MapLonLimit');
states = shaperead('usastatehi',...
'UseGeoCoords', true, 'BoundingBox', [lonlim', latlim']);
geoshow(ax, states, 'FaceColor', [1 1 1])
intersect(circlem(26.912,-97.074, 58.323,'facecolor','red'),circlem(26.842,-96.98,58.323,'facecolor','red'))
0 个评论
回答(1 个)
Amanpreetsingh Arora
2020-11-10
The "intersect" function returns common points in 2 inputs arrays and therefore is not useful for your case.
I believe that you are using the following "circlem" function from File Exchange. It seems that this function is only for plotting circles on map.
If you want to find overlapping areas between 2 circles, then the following discussion might help.
Basically, you will have to check whether the circles have partial, complete or no overlap and then calculate the intersection area accordingly. For the case of no overlap and complete overlap, it is 0 and area of smaller circle respectively. For partial overlap, the area is sum of two segments in the intersecting region.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Map Display 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!