@@ -41,6 +41,7 @@ topolTest::topolTest( QgisInterface* qgsIface )
4141 mTopologyRuleMap [" must not have invalid geometries" ].useSecondLayer = false ;
4242 mTopologyRuleMap [" must not have invalid geometries" ].useTolerance = false ;
4343 mTopologyRuleMap [" must not have invalid geometries" ].useSpatialIndex = false ;
44+ mTopologyRuleMap [" must not have invalid geometries" ].layer1SupportedTypes << QGis::Point << QGis::Polygon << QGis::Line;
4445
4546 // mTopologyRuleMap["segments must have minimum length"].f = &topolTest::checkSegmentLength;
4647 // mTopologyRuleMap["segments must have minimum length"].useTolerance = true;
@@ -51,67 +52,85 @@ topolTest::topolTest( QgisInterface* qgsIface )
5152 mTopologyRuleMap [" must not have dangles" ].useSecondLayer = false ;
5253 mTopologyRuleMap [" must not have dangles" ].useTolerance = false ;
5354 mTopologyRuleMap [" must not have dangles" ].useSpatialIndex = false ;
55+ mTopologyRuleMap [" must not have dangles" ].layer1SupportedTypes << QGis::Line;
5456
5557 mTopologyRuleMap [" must not have duplicates" ].f = &topolTest::checkDuplicates;
5658 mTopologyRuleMap [" must not have duplicates" ].useTolerance = false ;
5759 mTopologyRuleMap [" must not have duplicates" ].useSecondLayer = false ;
5860 mTopologyRuleMap [" must not have duplicates" ].useSpatialIndex = true ;
61+ mTopologyRuleMap [" must not have duplicates" ].layer1SupportedTypes << QGis::Point << QGis::Polygon << QGis::Line;
5962
6063 mTopologyRuleMap [" must not have pseudos" ].f = &topolTest::checkPseudos;
6164 mTopologyRuleMap [" must not have pseudos" ].useTolerance = false ;
6265 mTopologyRuleMap [" must not have pseudos" ].useSecondLayer = false ;
6366 mTopologyRuleMap [" must not have pseudos" ].useSpatialIndex = false ;
67+ mTopologyRuleMap [" must not have pseudos" ].layer1SupportedTypes << QGis::Line;
6468
6569 mTopologyRuleMap [" must not overlap" ].f = &topolTest::checkOverlaps;
6670 mTopologyRuleMap [" must not overlap" ].useTolerance = false ;
6771 mTopologyRuleMap [" must not overlap" ].useSecondLayer = false ;
6872 mTopologyRuleMap [" must not overlap" ].useSpatialIndex = true ;
73+ mTopologyRuleMap [" must not overlap" ].layer1SupportedTypes << QGis::Polygon;
6974
7075 mTopologyRuleMap [" must not have gaps" ].f = &topolTest::checkGaps;
7176 mTopologyRuleMap [" must not have gaps" ].useTolerance = false ;
7277 mTopologyRuleMap [" must not have gaps" ].useSecondLayer = false ;
7378 mTopologyRuleMap [" must not have gaps" ].useSpatialIndex = false ;
79+ mTopologyRuleMap [" must not have gaps" ].layer1SupportedTypes << QGis::Polygon;
7480
7581 mTopologyRuleMap [" Must not have multi-part geometries" ].f = &topolTest::checkMultipart;
7682 mTopologyRuleMap [" Must not have multi-part geometries" ].useSecondLayer = false ;
7783 mTopologyRuleMap [" Must not have multi-part geometries" ].useTolerance = false ;
7884 mTopologyRuleMap [" Must not have multi-part geometries" ].useSpatialIndex = false ;
85+ mTopologyRuleMap [" Must not have multi-part geometries" ].layer1SupportedTypes << QGis::Point << QGis::Polygon << QGis::Line;
7986
8087 // two layer tests
8188 mTopologyRuleMap [" must not overlap with" ].f = &topolTest::checkOverlapWithLayer;
8289 mTopologyRuleMap [" must not overlap with" ].useSecondLayer = true ;
8390 mTopologyRuleMap [" must not overlap with" ].useTolerance = false ;
8491 mTopologyRuleMap [" must not overlap with" ].useSpatialIndex = true ;
92+ mTopologyRuleMap [" must not overlap with" ].layer1SupportedTypes << QGis::Polygon;
93+ mTopologyRuleMap [" must not overlap with" ].layer2SupportedTypes << QGis::Polygon;
8594
86- mTopologyRuleMap [" points must be covered by segments" ].f = &topolTest::checkPointCoveredBySegment;
87- mTopologyRuleMap [" points must be covered by segments" ].useSecondLayer = true ;
88- mTopologyRuleMap [" points must be covered by segments" ].useTolerance = false ;
89- mTopologyRuleMap [" points must be covered by segments" ].useSpatialIndex = true ;
95+ mTopologyRuleMap [" must be covered by" ].f = &topolTest::checkPointCoveredBySegment;
96+ mTopologyRuleMap [" must be covered by" ].useSecondLayer = true ;
97+ mTopologyRuleMap [" must be covered by" ].useTolerance = false ;
98+ mTopologyRuleMap [" must be covered by" ].useSpatialIndex = true ;
99+ mTopologyRuleMap [" must be covered by" ].layer1SupportedTypes << QGis::Point;
100+ mTopologyRuleMap [" must be covered by" ].layer2SupportedTypes << QGis::Line << QGis::Polygon;
90101
91102 // mTopologyRuleMap["features must not be closer than tolerance"].f = &topolTest::checkCloseFeature;
92103 // mTopologyRuleMap["features must not be closer than tolerance"].useSecondLayer = true;
93104 // mTopologyRuleMap["features must not be closer than tolerance"].useTolerance = false;
94105 // mTopologyRuleMap["features must not be closer than tolerance"].useSpatialIndex = false;
95106
96- mTopologyRuleMap [" Ponts must be covered by endpoints of line" ].f = &topolTest::checkPointCoveredByLineEnds;
97- mTopologyRuleMap [" Ponts must be covered by endpoints of line" ].useSecondLayer = true ;
98- mTopologyRuleMap [" Ponts must be covered by endpoints of line" ].useTolerance = false ;
99- mTopologyRuleMap [" Ponts must be covered by endpoints of line" ].useSpatialIndex = true ;
100-
101- mTopologyRuleMap [" Line ends must be covered by Points" ].f = &topolTest::checkyLineEndsCoveredByPoints;
102- mTopologyRuleMap [" Line ends must be covered by Points" ].useSecondLayer = true ;
103- mTopologyRuleMap [" Line ends must be covered by Points" ].useTolerance = false ;
104- mTopologyRuleMap [" Line ends must be covered by Points" ].useSpatialIndex = true ;
105-
106- mTopologyRuleMap [" Points must be inside polygon" ].f = &topolTest::checkPointInPolygon;
107- mTopologyRuleMap [" Points must be inside polygon" ].useSecondLayer = true ;
108- mTopologyRuleMap [" Points must be inside polygon" ].useTolerance = false ;
109- mTopologyRuleMap [" Points must be inside polygon" ].useSpatialIndex = true ;
110-
111- mTopologyRuleMap [" Polygon must contain point" ].f = &topolTest::checkPolygonContainsPoint;
112- mTopologyRuleMap [" Polygon must contain point" ].useSecondLayer = true ;
113- mTopologyRuleMap [" Polygon must contain point" ].useTolerance = false ;
114- mTopologyRuleMap [" Polygon must contain point" ].useSpatialIndex = true ;
107+ mTopologyRuleMap [" must be covered by endpoints of" ].f = &topolTest::checkPointCoveredByLineEnds;
108+ mTopologyRuleMap [" must be covered by endpoints of" ].useSecondLayer = true ;
109+ mTopologyRuleMap [" must be covered by endpoints of" ].useTolerance = false ;
110+ mTopologyRuleMap [" must be covered by endpoints of" ].useSpatialIndex = true ;
111+ mTopologyRuleMap [" must be covered by endpoints of" ].layer1SupportedTypes << QGis::Point;
112+ mTopologyRuleMap [" must be covered by endpoints of" ].layer2SupportedTypes << QGis::Line;
113+
114+ mTopologyRuleMap [" end points must be covered by" ].f = &topolTest::checkyLineEndsCoveredByPoints;
115+ mTopologyRuleMap [" end points must be covered by" ].useSecondLayer = true ;
116+ mTopologyRuleMap [" end points must be covered by" ].useTolerance = false ;
117+ mTopologyRuleMap [" end points must be covered by" ].useSpatialIndex = true ;
118+ mTopologyRuleMap [" end points must be covered by" ].layer1SupportedTypes << QGis::Line;
119+ mTopologyRuleMap [" end points must be covered by" ].layer2SupportedTypes << QGis::Point;
120+
121+ mTopologyRuleMap [" must be inside" ].f = &topolTest::checkPointInPolygon;
122+ mTopologyRuleMap [" must be inside" ].useSecondLayer = true ;
123+ mTopologyRuleMap [" must be inside" ].useTolerance = false ;
124+ mTopologyRuleMap [" must be inside" ].useSpatialIndex = true ;
125+ mTopologyRuleMap [" must be inside" ].layer1SupportedTypes << QGis::Point;
126+ mTopologyRuleMap [" must be inside" ].layer2SupportedTypes << QGis::Polygon;
127+
128+ mTopologyRuleMap [" must contain" ].f = &topolTest::checkPolygonContainsPoint;
129+ mTopologyRuleMap [" must contain" ].useSecondLayer = true ;
130+ mTopologyRuleMap [" must contain" ].useTolerance = false ;
131+ mTopologyRuleMap [" must contain" ].useSpatialIndex = true ;
132+ mTopologyRuleMap [" must contain" ].layer1SupportedTypes << QGis::Polygon;
133+ mTopologyRuleMap [" must contain" ].layer2SupportedTypes << QGis::Point;
115134
116135
117136
0 commit comments