代码改变世界

探索拓扑规则检查

2007-06-15 09:07  flyingfish  阅读(2260)  评论(0编辑  收藏  举报

 

6-14日开会工作又有大变动。

一周过半,修改了拓扑的错误,接下来要关注拓扑规则检查和几何数据检查的内容并自己实现,不知道两周能否全部搞定。

从ArcGIS9.2的帮助中摘录点资料来参考,中文的文献竟然没找到几个。

ArcToolbox banner

Topology Rules by Origin Feature Class

Adds a new rule to a topology.

There are many topology rules that you can add to your topology. The rules you choose depend on the spatial relationships that are most important to maintain for the feature classes that participate in the topology.

Some topology rules govern the relationships of features within a given feature class, while others govern the relationships between features in two different feature classes. Topology rules can also be defined between subtypes of features in one or another feature class.

Topology rules are organized based on the geometry type of the origin feature class (polygon, line, or point). The origin feature class is the first feature class specified when adding the rule.

Polygon Rules

· Must Not Overlap—This rule requires that the interior of polygons in the feature class 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.

· Must Not Have Gaps—This rule requires that polygons not have voids within themselves or between adjacent polygons. Polygons can share edges, vertices, or interior areas. Polygons can also be completely disconnected. This rule is used when polygons or blocks of contiguous polygons should not have empty spaces within them. It is useful for modeling land ownership, as in a parcel fabric, where a given area is completely allotted to various polygons, but where external areas (roadways, for example) are not modeled in the same feature class.

· Must Not Overlap With—This rule requires that the interior of polygons in one feature class must not overlap with the interior of polygons in another feature class. Polygons of the two feature classes can share edges or vertices or be completely disjointed. This rule is used when an area cannot belong to two separate feature classes. It is useful for combining two mutually exclusive systems of area classification, such as zoning and water-body type, where areas defined within the zoning class cannot also be defined in the water body class and vice versa.

· Must Be Covered By Feature Class Of—This rule requires that a polygon in one feature class must share all of its area with polygons in another feature class. An area in the first feature class that is not covered by polygons from the other feature class is an error. This rule is used when an area of one type, such as a state, should be completely covered by areas of another type, such as counties.

· Must Cover Each Other—This rule requires that the polygons of one feature class must share all of their area with the polygons of another feature class. Polygons may share edges or vertices. Any area defined in either feature class that is not shared with the other is an error. This rule is used when two systems of classification are used for the same geographic area and any given point defined in one system must also be defined in the other. One such case occurs with nested hierarchical datasets, such as census blocks and block groups or small watersheds and large drainage basins. The rule can also be applied to nonhierarchically related polygon feature classes, such as soil type and slope class.

· Must Be Covered By—This rule requires that polygons of one feature class must be contained within polygons of another feature class. Polygons may share edges or vertices. Any area defined in the contained feature class must be covered by an area in the covering feature class. This rule is used when area features of a given type must be located within features of another type. This rule is useful when modeling areas that are subsets of a larger surrounding area, such as management units within forests or blocks within block groups.

· Boundary Must Be Covered By—This rule requires that boundaries of polygon features must be covered by lines in another features class. This rule is used when area features need to have line features that mark the boundaries of the areas. This is usually when the areas have one set of attributes and their boundaries have other attributes. For example, parcels might be stored in the geodatabase along with their boundaries. Each parcel might be defined by one or more line features that store information about their length or the date surveyed, and every parcel should exactly match its boundaries.

· Area Boundary Must Be Covered By Boundary Of—This rule requires that boundaries of polygon features in one feature class be covered by boundaries of polygon features in another feature class. This is useful when polygon features in one feature class, such as subdivisions, are composed of multiple polygons in another class, such as parcels, and the shared boundaries must be aligned.

· Contains Point—This rule requires that a polygon in one feature class contain at least one point from another feature class. Points must be within the polygon, not on the boundary. This is useful when every polygon should have at least one associated point, such as when parcels must have an address point.

Line Rules

· Must Not Overlap—This rule requires that lines not overlap with lines in the same feature class. This rule is used where line segments should not be duplicated; for example, in a stream feature class. Lines can cross or intersect but cannot share segments.

· Must Not Intersect—This rule requires that line features from the same feature class not cross or overlap each other. Lines can share endpoints. This rule is used for contour lines that should never cross each other or in cases where the intersection of lines should only occur at endpoints, such as street segments and intersections.

· Must Not Have Dangles—This rule requires that a line feature must touch lines from the same feature class at both endpoints. An endpoint that is not connected to another line is called a dangle. This rule is used when line features must form closed loops, such as when they are defining the boundaries of polygon features. It may also be used in cases where lines typically connect to other lines, as with streets. In this case, exceptions can be used where the rule is occasionally violated, as with cul-de-sac or dead end street segments.

· Must Not Have Pseudo-Nodes—This rule requires that a line connect to at least two other lines at each endpoint. Lines that connect to one other line (or to themselves) are said to have pseudo-nodes. This rule is used where line features must form closed loops, such as when they define the boundaries of polygons or when line features logically must connect to two other line features at each end, as with segments in a stream network, with exceptions being marked for the originating ends of first-order streams.

· Must Not Intersect Or Touch Interior—This rule requires that a line in one feature class must only touch other lines of the same feature class at endpoints. Any line segment in which features overlap, or any intersection not at an endpoint, is an error. This rule is useful where lines must only be connected at endpoints, such as in the case of lot lines, which must split (only connect to the endpoints of) back lot lines, and which cannot overlap each other.

· Must Not Overlap With—This rule requires that a line from one feature class not overlap with line features in another feature class. This rule is used when line features cannot share the same space. For example, roads must not overlap with railroads or depression subtypes of contour lines cannot overlap with other contour lines.

· Must Be Covered By Feature Class Of—This rule requires that lines from one feature class must be covered by the lines in another feature class. This is useful for modeling logically different but spatially coincident lines, such as routes and streets. A bus route feature class must not depart from the streets defined in the street feature class.

· Must Be Covered By Boundary Of—This rule requires that lines be covered by the boundaries of area features. This is useful for modeling lines, such as lot lines, that must coincide with the edge of polygon features, such as lots.

· Endpoint Must Be Covered By—This rule requires that the endpoints of line features must be covered by point features in another feature class. This is useful for modeling cases where a fitting must connect two pipes or a street intersection must be found at the junction of two streets.

· Must Not Self Overlap—This rule requires that line features not overlap themselves. They can cross or touch themselves, but must not have coincident segments. This rule is useful for features like streets, where segments might touch in a loop, but where the same street should not follow the same course twice.

· Must Not Self Intersect—This rule requires that line features not cross or overlap themselves. This rule is useful for lines, such as contour lines, that cannot cross themselves.

· Must Be Single Part—This rule requires that lines must have only one part. This rule is useful where line features, such as highways, may not have multiple parts.

Point Rules

· Must Be Covered By Boundary Of—This rule requires that points fall on the boundaries of area features. This is useful when the point features help support the boundary system, such as boundary markers, which must be found on the edges of certain areas.

· Must Be Properly Inside Polygons—This rule requires that points fall within area features. This is useful when the point features are related to polygons, such as wells and well pads or address points and parcels.

· Must Be Covered By Endpoint Of—This rule requires that points in one feature class must be covered by the endpoints of lines in another feature class. This rule is similar to the line rule, "Endpoint Must Be Covered By", except that, in cases where the rule is violated, it is the point feature that is marked as an error, rather than the line. Boundary corner markers might be constrained to be covered by the endpoints of boundary lines.

· Must Be Covered By Line—This rule requires that points in one feature class must be covered by lines in another feature class. It does not constrain the covering portion of the line to be an endpoint. This rule is useful for points that fall along a set of lines, such as highway signs along highways.

ArcToolbox banner

Check Geometry (Data Management)

Inspects each feature's geometry for problems. Valid input formats are shapefile and feature classes stored in a personal geodatabase or file geodatabase. SDE Geodatabases automatically check each geometry's validity when it is uploaded, therefore the Check and Repair Geometry tools are not for use with SDE.

sub sectionUsage tips

· The Output table will have one record for each problem found. If no problems are found, the Output table will have no records.

· The Output table has the following fields:

· CLASS—The full path to and name of the feature class in which the problem was found.

· FEATURE_ID—The Feature ID (FID) or Object ID (OID) for the feature with the geometry problem.

· PROBLEM—A short description of the problem.

· The PROBLEM field will contain one of the following:

· Short segment—Some segments are shorter than allowed by the system units of the spatial reference associated with the geometry.

· Null geometry—The feature has no geometry or nothing in the SHAPE field.

· Incorrect ring ordering—The polygon is topologically simple, but its rings may not be oriented correctly (outer rings - clockwise, inner rings - counterclockwise).

· Incorrect segment orientation—Individual segments are not consistently oriented. The "to" point of seg i should be incident on the "from" point of seg i+1.

· Self intersections—The interior of each part must not intersect itself or other parts. For a multipoint geometry, this means two of the points in the multipoint are in the same location (same x and y coordinate).

· Unclosed rings—The last segment in a ring must have its "to" point incident on the "from" point of the first segment.

· Empty parts—The geometry has multiple parts, and one of them is empty (has no geometry).

· For multipoint features, only the null geometry and empty part problems apply.

· For point features, only the null geometry problem applies.

· The problem identified by this tool can be fixed in the following ways:

· Editing the feature class with the geometry problem and fixing each individual problem identified. Some of the problems, such as nonsimple geometry, can not be fixed in the Editor.

· By running the Repair Geometry tool on the feature classes that were identified as having geometry problems.

· The following environment setting affects this tool: Extent.

· To facilitate the review of the features which are reported to have geometry problems, in ArcMap you can join the input features to the output table using the Join tool. Simply join using the input's ObjectID field, and the output table's FEATURE_ID field. You may also uncheck the "Keep All" option so that only features with geometry problems are displayed.

ArcToolbox banner

Repair Geometry (Data Management)

Inspects each feature's geometry for problems and fixes the problems that are found. Valid input formats are shapefile and feature classes stored in a personal geodatabase or file geodatabase. SDE Geodatabases automatically check each geometry's validity when it is uploaded, therefore the Check and Repair Geometry tools are not for use with SDE.

sub sectionUsage tips

· The Check Geometry tool can be used to identify feature classes and features within those feature classes that have geometry problems.

· This tool uses the same logic as the Check Geometry tool, but when a geometry problem is discovered, a fix (listed below) is applied immediately.

· Problems repaired with this tool:

· Null geometry—The feature will be deleted from the feature class.

· Short segment—The geometry's short segment will be deleted.

· Incorrect ring ordering—The geometry will be updated to have correct ring ordering.

· Incorrect segment orientation—The geometry will be updated to have correct segment orientation.

· Self intersections—The geometry's segments that intersect will be split at their intersection.

· Unclosed rings—The unclosed rings will be closed.

· Empty parts—The parts that are null or empty will be deleted.

· After applying one of the repairs above, the tool will re-evaluate the feature's geometry to see if it still has a problems, if another problem is discovered, another repair will be performed immediately on that feature. This can lead to more than one fix being applied to a single feature.

· Line features that are M aware will not be modified (repaired) for any of the cases above unless they are short segments or null geometry.

· The following environment setting affects this tool: Extent and workspace.