7. Must not intersect (line) - Maureque/GSoC2020-topology-osgeo-gvsig GitHub Wiki
Rule details.
-
Rule name: TopologyRuleMustNotIntersectLine
-
Repository: https://github.com/Maureque/TopologyRuleMustNotIntersectLine
-
Description: The rule requires that the lines not cross or overlap any part of another line in the same layer. The errors report could be lines and points.
If the lines overlap a line error report is created.
If lines cross a point error report is created, where the points correspond to the intersections.
For example, it is useful when lines whose segments should never cross or occupy the same space with other lines.
-
Release: https://github.com/Maureque/TopologyRuleMustNotIntersectLine/releases/tag/1.0.0-0
-
Development process: To minimize risks and optimize the development process, is followed by the following methodology:
- Approach the problem.
- Analyze data and classes.
- Algorithm design to solve the problem.
-
The rule requires that the entities of lines of the same layer not cross or overlap each other.
For this rule, there is one layer of lines. The lines are taken with a certain tolerance, so a buffer is calculated where the radius of this buffer is the tolerance.
If the type of geometry of the input layer is multiline, the procedure described above is performed for each of the lines that make up the multiline.
In conclusion, lines must not cross or overlap any part of another line in the same layer, on the contrary, line errors are created where lines overlap or cross.
-
Input data:
- Line layer
-
Output data:
- Lines errors report.
-
Error correction:
-
Delete line action. This action deletes line errors. This action is useful to delete the entities that do not comply with the rule, always taking account of the established tolerance. The entities to delete can be selected individually. View example.
-
Mark line action. This action makes a new layer with red lines, which corresponds to the entities selected in the error report. Line errors are created if the lines overlap. This action marks the errors in a clear visual way, then the user must choose what to do with them. The entities to mark can be selected individually.
-
Mark point action. This action makes a new layer with red points, which corresponds to the entities selected in the error report. Point errors are created if the lines cross, where the points correspond to the intersections. This action marks the errors in a clear visual way, then the user must choose what to do with them. The entities to mark can be selected individually. View example.
-
- Optimize algorithm.
- Codify.
- Test, debug, and refactor.
- Document throughout the whole process. This activity has continuity from the beginning of the development process until the end of it.
Examples.
Operation of the integrated rule to the topology framework.
Dataset:
Input layer: Name "LINES_1" with 12 entities.