4. Must not overlap with (Must not overlap line) - Maureque/GSoC2020-topology-osgeo-gvsig GitHub Wiki

Rule details.

Rule image

  • Rule name: TopologyRuleMustNotOverlapWithLine

  • Repository: https://github.com/Maureque/TopologyRuleMustNotOverlapWithLine

  • Description: Lines in one layer must not overlap with lines in another layer, if overlaps a report of lines error is created, this report is composed of the intersection of the lines from the first layer and the lines that form the second layer that overlaps.

    For example, is useful when you are planning to build a way, this one can cross to rivers or water courses but the way can not overlap with the river segment.

  • Release: https://github.com/Maureque/TopologyRuleMustNotOverlapWithLine/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 lines in the input layer must not overlap with any of the lines from the coverage layer if this is not the case the error report is created.

      For this rule there are 2 layers, one is taken as the input layer and the other is the coverage layer. The lines of the input layer are taken with a certain tolerance, so a buffer is calculated where the radius of this buffer is the tolerance. The buffer is a polygon where if it intersects any of the lines from the coverage layer, the lines will be overlapped.

      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. The geometry type of the second layer does not need to be analyzed since this is done by the intersects function which comes by default implemented.

      In conclusion, if the lines are overlapped an error report will be created, this will be a report of error lines, which contains the lines of the input layer that are overlapped by any of the lines of the coverage layer.

    • Input data:

      • Input, lines layer.
      • Coverage, lines layer.
    • Output data:

      • Lines errors report.
    • Error correction:

      • Delete line action. This action deletes the line errors, these are the overlapped lines. Delete the entities that do not comply with the rule, always taking account of the established tolerance. The lines to delete can be selected individually.
      • Mark line action. This action marks the portion of the lines errors, that overlaps. Mark the portion of the entities that do not comply with the rule, always taking account of the established tolerance. The lines to mark can be selected individually.
    • Optimize algorithm.
    • Codify.
    • Test, debug and refactor. The tests were performed with the following input data:
      • Dataset:
        • Input layer: Name "LINES_1" with 7 entities.
        • Coverage layer: Name "LINES_2" with 7 entities.
    • 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.

Input layer: Name "LINES_1" with 7 entities.

Coverage layer: Name "LINES_2" with 7 entities.

Input data:

Input layer

Coverage layer

Create plan:

Create topology plan

Defining the dataset:

Layers in the topology plan

Setting the rule:

Rule selection

Executing topology plan:

Executing topology plan

Result:

Error report

Mark line action