예제 #1
0
 def __init__(self):
     AbstractTopologyRuleFactory.__init__(
         self, "MustBeLargerThanClusterTolerancePolygon",
         "Must Be Larger Than Cluster Tolerance",
         "Requires that a feature does not collapse during a validate process and applies to all line and polygon features. In other words, the vertices of each feature of these types of geometries must be spaced a distance greater than the tolerance established by the user in the topological plan rule. Vertices that fall within the tolerance are defined as coincident and are snnaped together. Thiss rule is mandatory for all topology.",
         ListBuilder().add(Geometry.TYPES.POLYGON).add(
             Geometry.TYPES.MULTIPOLYGON).asList())
 def __init__(self):
     AbstractTopologyRuleFactory.__init__(
         self,
         "MustNotIntersectLineRule",
         "Must Not Intersect",
         "This rule requires lines not to intersects.",
         ListBuilder().add(Geometry.TYPES.LINE).add(Geometry.TYPES.MULTILINE).asList()
     )
예제 #3
0
 def __init__(self):
   AbstractTopologyRuleFactory.__init__(
     self,
     "MustNotHaveDanglesLine",
     "Must Not Have Dangles", 
     "Requires that a line feature must touch line features from the same layer at both ends. An endpoint that is not connected to another line is an error, called dangle, although there are exceptions. Therefore, the anchors or intersections of the linear elements must be solved correctly, based on semantic criteria, such as line direction, and tolerance in each case, so that there are no free ends by overshoot and undershoot.", 
     ListBuilder().add(Geometry.TYPES.LINE).add(Geometry.TYPES.MULTILINE).asList()
     )
 def __init__(self):
   AbstractTopologyRuleFactory.__init__(
     self,
     "MustNotOverlapPolygon2",
     "Must Not Overlap2", 
     "Requires that the interior of polygons in the dataset not overlap. The polygons can share edges or vertices. This rule is used when an area cannot belong to two or more polygons. It is useful for modeling administrative boundaries, such as ZIP Codes or voting districts, and mutually exclusive area classifications, such as land cover or landform type.", 
     ListBuilder().add(Geometry.TYPES.SURFACE).add(Geometry.TYPES.MULTISURFACE).asList()
     )
 def __init__(self):
     AbstractTopologyRuleFactory.__init__(
         self, "MustNotOverlapWithLineRule", "Must Not Overlap With",
         "This rule requires lines not to overlap.",
         ListBuilder().add(Geometry.TYPES.LINE).add(
             Geometry.TYPES.MULTILINE).asList(),
         ListBuilder().add(Geometry.TYPES.LINE).add(
             Geometry.TYPES.MULTILINE).asList())
 def __init__(self):
     AbstractTopologyRuleFactory.__init__(
         self,
         "PointsMustBeCoveredByLinePoint",
         "Points Must Be Covered By Line Point Rule",
         "This rule requires that the point in on layer must be covered by lines in another layer so points errors are created on the points that are not covered by lines.",
         ListBuilder().add(Geometry.TYPES.POINT).add(Geometry.TYPES.MULTIPOINT).asList(),
         ListBuilder().add(Geometry.TYPES.CURVE).add(Geometry.TYPES.MULTICURVE).asList()
     )
예제 #7
0
 def __init__(self):
     AbstractTopologyRuleFactory.__init__(
         self,
         "ContainsPointPolygon",
         "Contains Point Polygon",
         "This rule requires that each polygon of the input layer contain at least one point from the coverage layer of points. Points must be within the polygon, not on the boundary.",
         ListBuilder().add(Geometry.TYPES.SURFACE).add(Geometry.TYPES.MULTISURFACE).asList(),
         ListBuilder().add(Geometry.TYPES.POINT).add(Geometry.TYPES.MULTIPOINT).asList()
     )
 def __init__(self):
     AbstractTopologyRuleFactory.__init__(
         self, "MustBeCoveredByEndpointOfPoint",
         "Must Be Covered ByEndpoint Of",
         "This rule requires that the point in on layer must be covered by the ends of lines in another layer so points errors are created on the points that are not covered by the ends of lines. For example, this rule is useful when is needed that street intersections must be covered by the endpoints of street centerlines",
         ListBuilder().add(Geometry.TYPES.POINT).add(
             Geometry.TYPES.MULTIPOINT).asList(),
         ListBuilder().add(Geometry.TYPES.CURVE).add(
             Geometry.TYPES.MULTICURVE).asList())
예제 #9
0
 def __init__(self):
     AbstractTopologyRuleFactory.__init__(
         self, "MustBeProperlyInsidePolygonsPoint",
         "Must Be Properly Inside Polygons Point Rule",
         "This rule requires that 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.",
         ListBuilder().add(Geometry.TYPES.POINT).add(
             Geometry.TYPES.MULTIPOINT).asList(),
         ListBuilder().add(Geometry.TYPES.SURFACE).add(
             Geometry.TYPES.MULTISURFACE).asList())
예제 #10
0
 def __init__(self):
     AbstractTopologyRuleFactory.__init__(
         self, "MustBeCoveredByBoundaryOfPoint",
         "Must Be Covered By Boundary Of Point Rule",
         "This rule requires that points must fall on the boundary. So points errors are created on the points that are not on polygon's boundary.",
         ListBuilder().add(Geometry.TYPES.POINT).add(
             Geometry.TYPES.MULTIPOINT).asList(),
         ListBuilder().add(Geometry.TYPES.SURFACE).add(
             Geometry.TYPES.MULTISURFACE).asList())
예제 #11
0
    def __init__(self):
        AbstractTopologyRuleFactory.__init__(
            self, "ContainsOnePointPolygon",
            "Contains One Point Polygon Rule GSoC2020",
            "The rule evaluates all the polygons. If each polygon has only one point inside, the rule returns True. The point has to fall within the polygon's area, not on the boundary or out of it. The evaluated polygons without points make the rule False too. The red polygons does the rule false. In 2DM, 3D and 3DM formats, the Z coordinate or M coordinate are ignored.\n \n NOTE 1: If the Tolerance equals zero, the rule does as above. If the tolerance is greater than zero, the scrip does a polygon buffer with tolerance value. If the point are inside of new dataset 1 polygon, the rule return True. \n \n NOTE 2: For Multipolygons, only one of their geometries can have one point inside, the rule returns True. For Multipoints, if only one of these geometries are inside of polygon's area, the rule returns True.",
            ListBuilder().add(Geometry.TYPES.POLYGON).add(
                Geometry.TYPES.MULTIPOLYGON).asList(),
            ListBuilder().add(Geometry.TYPES.POINT).add(
                Geometry.TYPES.MULTIPOINT).asList())

        pathName = gvsig.getResource(__file__, 'ContainsOnePointPolygon.json')
        url = File(pathName).toURL()
        gvsig.logger(str(url))
        json = RuleResourceLoaderUtils.getRule(url)
        self.load_from_resource(url, json)
예제 #12
0
    def __init__(self):
        AbstractTopologyRuleFactory.__init__(
            self, "ContainsPointPolygon",
            "Contains Point Polygon Rule GSoC2020",
            "The rule evaluates all the polygons. If each polygon have at least one point inside, the rule returns True. The points has to fall within the polygon's area, not on the boundary or out of it. The red polygons does the rule false.\n NOTE 1: If the Tolerance equals zero, the rule does as above. If the tolerance is greater than zero, the point are transformed into polygon. If one point of this new polygon are inside of dataset 1 polygon, the rule return True. \n NOTE 2: The behavior of the rule in multigeometries is simple. For Multipolygons, if one of their geometries has at least one point inside, the rule returns True. For Multipoints, if one of these geometries are inside of polygon's area, the rule returns True.",
            ListBuilder().add(Geometry.TYPES.POLYGON).add(
                Geometry.TYPES.MULTIPOLYGON).asList(),
            ListBuilder().add(Geometry.TYPES.POINT).add(
                Geometry.TYPES.MULTIPOINT).asList())

        pathName = gvsig.getResource(__file__, 'ContainsPointPolygon.json')
        url = File(pathName).toURL()
        gvsig.logger(str(url))
        json = RuleResourceLoaderUtils.getRule(url)
        self.load_from_resource(url, json)
예제 #13
0
    def __init__(self):
        AbstractTopologyRuleFactory.__init__(
            self, "MustCoverEachOtherPolygon",
            "Must Cover Each Other Polygon Rule GSoC2020",
            "The rule evaluates all the polygons. All dataset 2 polygon areas must cover the dataset 1 polygon area. The rule returns False when a part of the dataset 1 polygon area is not covered or not completely covered. In 2DM, 3D and 3DM formats, the Z coordinate or M coordinate are ignored.\n \n NOTE 1: The Tolerance parameter is useless for this rule.",
            ListBuilder().add(Geometry.TYPES.POLYGON).add(
                Geometry.TYPES.MULTIPOLYGON).asList(),
            ListBuilder().add(Geometry.TYPES.POLYGON).add(
                Geometry.TYPES.MULTIPOLYGON).asList())

        pathName = gvsig.getResource(__file__,
                                     'MustCoverEachOtherPolygon.json')
        url = File(pathName).toURL()
        gvsig.logger(str(url))
        json = RuleResourceLoaderUtils.getRule(url)
        self.load_from_resource(url, json)
예제 #14
0
    def __init__(self):
        AbstractTopologyRuleFactory.__init__(
            self, "UserDefinedRule", "User defined rule GSoC2020",
            "This rule allows the user to define a data check expression and another expression to correct it. The dataset features are evaluated for the check expression and it gives a boolean. If the result is False,the feature dont fulfill the rule and it creates a entry in the error report. If the result is True, the feature fulfills the expression. On Inspector de errores del Plan de topologia window we can remove the feature or apply the corrective expression. \n\n The check and corrective expression are create on gvSIG Cosa languaje.",
            None)

        pathName = gvsig.getResource(__file__, 'UserDefinedRule.json')
        url = File(pathName).toURL()
        gvsig.logger(str(url))
        json = RuleResourceLoaderUtils.getRule(url)
        self.load_from_resource(url, json)

        dynObjectManager = ToolsLocator.getDynObjectManager()
        self.parametersDefinition = dynObjectManager.createDynClass(
            "UserDefinedRuleParameters", "UserDefinedRuleParameters")
        self.parametersDefinition.addDynFieldString(
            "CheckExpression").setLabel("Check expression").setDescription("")
        self.parametersDefinition.addDynFieldString(
            "CorrectiveExpression").setLabel(
                "Corrective expression").setDescription("")
예제 #15
0
 def __init__(self):
     AbstractTopologyRuleFactory.__init__(
         self, "MustBeDisjointPoint", "Must Be Disjoint",
         "Requires that points be separated spatially from other points in the same feature class. The overlapping points are errors. This rule ensures that points are not coincident or duplicated within the same feature class",
         ListBuilder().add(Geometry.TYPES.POINT).add(
             Geometry.TYPES.MULTIPOINT).asList())
 def __init__(self):
     AbstractTopologyRuleFactory.__init__(
         self, "MustNotHaveGapsPolygon", "Must Not Have Gaps",
         "This rule requires adjacent polygons not to have gaps.",
         ListBuilder().add(Geometry.TYPES.SURFACE).add(
             Geometry.TYPES.MULTISURFACE).asList())