Skip to Main Content
Focusing on using Oracle to implement the differentiation of spatial topological relations between lines and regions, an algorithm based on Oracle Spatial Topology Data Model and the 9-intersection model is designed to determine the nine elements of the 9-intersection matrix, which can be used to differentiate the 19 kinds of spatial topological relations between a line and a region. Three elements with respect to the boundary of the line can be determined by using SDO_TOPO_MAP.GET_CONTAINING_FACE() function to test the relations between the two extreme nodes of the line and the region. Three elements about the interior of the line can be determined by using SDO_GEOM.SDO_INTERSECTION() function to test the relations between the line and the region. The last three element with respect to the exterior of the line can be determined by using the infiniteness of the exterior of spatial lines and regions. The algorithm can be directly used to the line that contains one or more shape points and fit for differentiating the spatial topological relations under both lines/regions and regions/lines. Experiments by practice in programming showed that the algorithm was valid and reduced the use of Oracle Spatial functions so as to can run faster.