# 6. Must be properly inside polygons

## Rule details. • Rule name: TopologyRuleMustBeProperlyInsidePolygonsPoint

• Description: In this rule the points must fall within the area, not on the boundary. So points errors are created on the points that are not inside the polygon. This is useful when the points are related to polygons, such as wells and address points and parcels.

• 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 points in the input layer must be contained by the polygon layer, requires that points fall within area.

For this rule there are 2 layers, one is taken as the input layer and the other is the coverage layer. The input layer is a point layer, which it is taken with tolerance (which it is set by the user when selecting the topological rule), so a buffer is calculated where the radius of this buffer is the tolerance and the cover layer is a polygons layer.

The points of the input layer must be contained by the polygon layer, which is the coverage layer. If the points do not fall within the area of the polygon it is created an error report, this it is a report of error points, which contains the points of the input layer that are not contained in the coverage layer.

In this rule, points must fall within the area, not on the boundary. So, unlike the previous rules, the function contains is used instead of the function intersects.

If the type of geometry of the input layer is multipoint the procedure described above is performed for each of the points that make up the multipoint. The geometry type of the second layer does not need to be analyzed since this is done by the contains function which comes by default implemented.

In conclusion, if the points are not properly inside polygons it is created an error report, this it is a report of error points, which contains the points of the input point layer that are not properly inside on the coverage polygon layer.

• Input data:

• Input, points layer
• Coverage, polygon layer
• Output data:

• Point errors report
• Error correction:

• Delete Point action. Points that are not covered by the polygon can be deleted. The delete action removes point entities that are not properly within polygon entities.
• 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.

### Layers: ### Rule: ### Errors Report:  ##### Clone this wiki locally
You can’t perform that action at this time.