I am looking for a clever way to define the points of the polygons A, B, C, E, F (see attached figure 2007_zones.png) on my map.
I have several maps, and I want to find a technique that I can reuse even when the shapes of the polygons A, B, C, E, F vary.
I am working on a grid of 360x360 with x and y values from 1 to 361.
The shape in light green is an alphaShape object, and I can access all the points (x,y) forming this shape with the file shpfile.mat.
The positions of all the points in the orange contour are contained in the file startfile.mat with the position defined by (xstart,ystart).
The positions of all the points in the purple contour are contained in the file endfile.mat with the positions defined by (xend,yend).
I can define the regions A (blue) and the combined regions BCEF (red) using the inShape function of alphaShape.
-->see attached figure main_zones.fig and code below
I am now looking for a way to partition the respective regions B, C, E ,and F, and I have no clue how to proceed. Maybe using the numRegions function for the alphaShape object?
Here is my code to find the points respectively in region A (blue) and BCEF (red)
tf1 = inShape(shp,xstart,ystart);
shpBCEF = alphaShape(x0,y0,1);
shp1 = alphaShape(x1,y1,2);
tf2 = inShape(shp,xend,yend);
tf3 = inShape(shp1,x2,y2);
[M1,c1] = contour(xx,yy,SICSTART,1,'LineWidth',3,'Color', [1.0000 0.5984 0.2000]);
[M2,c2] = contour(xx,yy,SICEND,1,'LineWidth',3,'Color', [0.6769 0.4447 0.7114]);