A MapX-based Segmentation Algorithm of Region Feature by Polyline

—MapX didn’t provide a ready function which can be easy to split region feature in the client. The objective of this study was to design a segmentation algorithm for cutting region feature with polyline. In order to convenience the description, during the segmentation, only 2 intersection points were taken into consideration. According to the order of P1(the first intersection point) and P2(the second inter-section point) in the R(region feature) and L(polyline feature), 4 kinds of situations had been taken into account, those were respectively, P2 was always after P1 in the R and L, P2 was after P1 in the R but P2 was before P1 in the L, P2 was always before P1 in the R and L, and P2 was before P1 in the R but P2 was after P1 in the L. Segmentation results showed that the algorithm was stable and reliable.

INTRODUCTION GIS(Geographic information system) had been more widely used to forest resources management along with the continuous development of "3S" (RS, GIS, GPS) and other relational hardware and software technologies [1][2][3][4][5]. To some extent, as MapInfo, accepted by many users because of its simplicity and ease of use with more comprehensive functionality [6][7]. Of course, no matter what type of GIS software, considering the functional versatility, for general users, its operation was still too complex, which provided a market space for developing specialized geographic information system by programming with object-oriented programming language and GIS middleware.
Sub-compartment was the basic unit for forest resource management, and its area should be adjusted according to different management objective. Usually, in forest resources GIS, a sub-compartment should be represented as a region feature and its size should be adjusted by splitting or merging. The region feature, stored and displayed as a form of vector data , was composed of a series of ordered points, and each point was represented by one pair of coordinates (x, y). Specifically, the first point and the last point was the same point in region feature.
MapX was a kind of middleware technology that can provide most of the function of MapInfo, and it was frequently used in programming for specialized GIS [8][9][10][11]. But it did not provide a ready feature segmentation algorithm which could be easy to split dynamically subcompartment in the client. Considering that the boundary of the region feature was usually composed by polyline with a lot of points, although previous study had described segmentation algorithm about region feature divided by straight-line [12], it should be improved.
To solve this problem, this paper designed a MapXbased segmentation algorithm of region feature by polyline, and it was programmed by VB6.0.

II. DESCRIPTION OF THE PROBLEM
Supposing that R should be segmented into R1 and R2, Pts1 and Pts2 were the ordered point sets about R1 and R2 respectively, L was a polyline, L and R intersected in 2 points of P1 and P2 whose coordinates were P1.X and P1.Y in P1, and P2.X and P2.Y in P2, meanwhile, P1.X <= P2.X.
(1)Set ptsChange to false (2)Looped for each edge of Ej, and the value of j was from 1 to n-1. Where, a virtual rectangular should be created which took Ej as main diagonal or sub-diagonal, minX and maxY as the left-top corner coordinates ， maxX and minY as the right-bottom corner coordinates correspondingly. The P1 was located in Ej if and only if minX ≤ P1.X ≤maxX and minY ≤ P1.Y ≤ maxY, that meant the location of P1 in R was found. Similarly, it should be found that the position of the point of P2 located in R also.
(3)Similarly, they could be found that the position of the points of P1 and P2 located in L.
(4)Obtained the point sets of Pts1 and Pts2, and their process detailed in the program flow diagram (shown in Fig.2).
(5)Converted the point sets of Pts1 and Pts2 into independent region features which should be added into current layer immediately.   Fig.3, the simulation results indicated that the algorithm had achieved to the segmentation to region feature based on polyline.
VI. CONCLUSION MapX did not provide a ready segmentation algorithm which could be easy to split region feature in the client dynamically. To solve this problem, this paper proposed a MapX-based segmentation algorithm of region feature by polyline. The algorithm had taken a variety of complex segmentation into account based on 2 intersection points. Segmentation results showed that the algorithm was stable and reliable.