获得 Production Mapping 许可后可用。
摘要
Generates a simplified hydrographic line network for display at a smaller scale. The resulting hydrographic network maintains the main arteries while pruning less significant features based on importance, length, and spacing between features.
To prune features based on the number of tributaries, consider using the Thin Hydro Features tool.
插图
用法
This tool is optimized for the spatial relationships typically found in a hydrographic network. Unexpected results may be produced if the tool is used to process other themes.
If the tool finds a section of the network where a line segment needs to be removed, the hierarchy, minimum length, and favor angles parameters are used to determine which features to hide. For example, a river section ends with a Y where there are two end river segments that connect to a single main branch. If the hierarchy is set and one segment is more important than another, it will likely be kept and the other hidden. If the favor angles option is enabled, the end segment that creates a straighter path with the main branch will likely be kept even if it is shorter than the other end segment. If the favor angles option is disabled and the features have the same hierarchy, the longer segment will likely be kept.
The integrity of the results of this tool relies on the topological integrity of the inputs. Take note of the following input data requirements and suggestions:
- Connectivity—Proper connections must exist at intersections that faithfully represent the connectivity of the network.
- False dead ends—A false dead end is an unconnected segment that appears visually connected when symbolized at the final map scale. These may be areas where you expect connectivity based on visual appearance, but features are not actually connected. If you process the tool without repairing the connectivity, unexpected disconnects may be visually apparent in the results.
- Directionality—One of the key characteristics of a hydrology network is the ability to determine the direction water flows from one feature to another. Prune hydro uses the digitization direction of the line segments to determine flow direction. If you process the tool with segments digitized against the flow of other segments, unexpected disconnects may be visually apparent in the results.
- Empty or null geometry—The input features must consist of valid geometries. If necessary, use the Repair Bad Geometry tool to repair these features.
- Single-part features—The input features should not contain multipart features. Use the Multipart To Singlepart tool or create a topology with a Must Be Single Part line rule to convert features to single part.
An integer field for invisibility must be present on the feature class. Features that should remain visible are assigned a value of 0; those that should be removed from the display are assigned a value of 1. Use a layer definition query or a selection to display the resulting simplified collection (for example, invisibility <> 1). You can use multiple invisibility fields to store different results—corresponding to different output scales—on the same feature class.
Prune hydro works on hydrographic lines; however, hydrographic networks often contain other geometry types as well. The Compare Features parameter is used to provide context of other features in the complete hydrographic network. For example, a river line might stop at the edge of a lake polygon and another line representing the same river may continue out of the other side of the lake. Including the lakes as compare features ensures that lines touching the lake features are not removed even if they meet other criteria of the tool, such as minimum length. This ensures that gaps are not produced in the entire hydrographic network not just the lines used as input features.
语法
PruneHydro(input_features, invisibility_field, minimum_length, {minimum_spacing}, {hierarchy_field}, {compare_features}, {merge_split_features}, {favor_angles})
参数 | 说明 | 数据类型 |
input_features | The hydrography line feature to be pruned. | Feature Layer |
invisibility_field | Features that participate in the pruned hydrography collection will have a value of 0. Those that are extraneous have a value of 1. A layer definition query can be used to display the results. | Field |
minimum_length | An indication of the shortest hydro segment that is sensible to display at the output scale. It defines a sense of the resolution or granularity of the resulting pruned hydrography. It should correspond to a length that is visually significant to include at the final scale. The results of this tool are a balanced compromise between the requirements posed by hierarchy, minimum length, minimum spacing, angle of connecting features, and directionality of the hydro geometry. Therefore, the minimum length value cannot necessarily be measured directly in the resulting feature set. | Linear Unit |
minimum_spacing (可选) | An indication of the shortest distance between a hydro segment that is sensible to display at the output scale. If the spacing between two parallel trending features is under this value, one of the features will be set as invisible. It defines a sense of the density of the resulting pruned hydrography. It should correspond to the distance between two parallel trending features that is visually significant to include at the final scale. When the density of features is too high (that is, the features are too closely spaced), at least one feature will be hidden. This can result in important features or features longer than the minimum length being hidden. | Linear Unit |
hierarchy_field (可选) | This field contains the hierarchical ranking of feature importance, where 1 is very important, and larger integers reflect decreasing importance. A value of 0 forces the feature to remain visible in the final results. It identifies the relative importance of features to help establish which features are significant. Hierarchy value 1 indicates the most important features, with importance decreasing as hierarchy value increases. For optimal results, use no more than five levels of hierarchy. Input hydro features with Hierarchy = 0 are considered locked and will remain visible, along with adjacent features necessary for connectivity. | Field |
compare_features [compare_features,...] (可选) | If a segment is snapped to features in the provided layers, they will not be removed. An example would be a small river segment snapped to a lake. Even if the segment is under the minimum_length, it would need to remain to ensure that it remains connected to the water body into which it flows. | Feature Layer |
merge_split_features (可选) | This will merge any split features in the input_features to help ensure that the main waterway is preserved. If set to NO_MERGE_SPLITS, the ends of the waterway may be removed due to being under the minimum_length.
| Boolean |
favor_angles (可选) | If set to FAVOR_ANGLES, the angles between waterway branches will be used to help determine the main waterway; the highest angle will be used. If disabled, the longest branch will be considered part of the main waterway.
| Boolean |
派生输出
名称 | 说明 | 数据类型 |
output_feature_class | The output feature layer that includes the modified features from the original input. | Feature Layer |
代码示例
PruneHydro example (stand-alone script)
The following stand-alone sample script demonstrates how to use the PruneHydro tool to simplify a hydrography network.
# Name: PruneHydro_Example1.py
# Description: Prunes a hydrography line network without touching the main artery, while keeping the data intact and becoming visually pleasing.
# In this example, output is derived and add a definition query to view output.
# import system modules
import arcpy
# Check out extension
arcpy.CheckOutExtension("Foundation")
# Define variables
rivers = r"C:\Data\Generalization_Samples.gdb\rivers"
lakes = r"C:\Data\Generalization_Samples.gdb\lakes"
# Execute Prune Hydro
arcpy.PruneHydro_production(rivers, "INVISIBILITY", "1000 Meters", "500 Meters", "HIERARCHY", lakes, "MERGE_SPLITS", "NO_FAVOR_ANGLES")
#Check in Production Mapping License
arcpy.CheckInExtension("Foundation")
环境
许可信息
- ArcGIS Desktop Basic: 否
- ArcGIS Desktop Standard: 需要 Production Mapping
- ArcGIS Desktop Advanced: 需要 Production Mapping