Polygon To Centerline (Topographic Production)

Краткая информация

Creates centerlines from polygon features. This tool is useful for creating centerlines from hydrographic polygons for use at smaller scales.

Иллюстрация

Polygon To Centerline tool illustration

Использование

  • The Output Feature Class parameter value must be a feature class in a geodatabase. Shapefiles are not supported.

  • This tool is optimized for spatial relationships and junctions typically found in a hydrographic network. Examples of these are long, thin polygons such as rivers or canals. This tool is also optimized for junctions that occur on the same elevation, such as when rivers converge. However, the tool does not handle junctions that occur on different levels, such as when highway overpasses cross over one another.

  • For best results, run the Dissolve tool to dissolve touching polygon features before running Polygon To Centerline. While this tool checks spatial relationships between the input features to ensure centerlines connect when input features touch, running dissolve first may achieve a cleaner result.

  • The integrity of the output relies on the topological integrity of the inputs. The following are input data requirements and suggestions:

    • Empty or null geometry—The Input Features parameter value must consist of valid geometries. If necessary, use the Repair Geometry tool to repair the features.
    • Overlapping geometries—The connecting features hidden behind input features may generate visually impaired centerlines.
    • Nonlinear segments—Bézier curve, circular arc, and elliptic arc segments may compromise the quality of the results.
  • The output centerlines will not contain any geographic attributes from the input polygon features. A field named FID will be added to the Output Feature Class parameter value. This field is populated with the ObjectID of the polygon from which the centerline was created, which can be used to join the centerlines to the input polygons. If a tool such as Dissolve or Eliminate Polygon Part was run on the original polygons to prepare the data before running Polygon To Centerline, the FID field will link to the prepared polygons, not the original polygons. The Identity tool can be run using the original polygons to split the centerlines and identify the original polygon that contains the centerline.

  • The output will include a field named FID_[input feature class name]. If the centerline touches a feature in the input feature class that is not the feature used to create the centerline, the field will be populated with the ObjectID of the touching input feature. If the centerline does not touch any other input features, the value in the field will be NULL.

  • The output will include a field for each feature class provided for the Connecting Features parameter. The field will be named FID_[connecting feature class name]. If the centerline touches a feature in the connecting feature class, the field will be populated with the ObjectID of the touching feature. If the centerline does not touch any connecting features, the value in the field will be NULL.

  • For best results, run the Eliminate Polygon Part tool first to remove small holes in the polygon features, for example, to remove holes from the middle of river polygons where island polygons exist. If a hole exists in the polygon, the centerline will branch around the hole, potentially creating two short centerline segments. Filling small holes before running Polygon To Centerline will create a single centerline through the section where a hole previously existed.

  • The tool applies an adaptive densification to the input features to improve centerline quality. Although it is not necessary to densify input features before running this tool, simplifying input geometries may speed up the process due to the reduced number of vertices.

  • Flow direction will be honored only for the connecting line features. If there are none, the flow direction will follow the longest path starting at an end point.

  • In addition to connecting features, the tool will use the input features to identify whether any of them are touching each other and can be used to refine the centerlines.

  • The tool may not honor touch points if the input and connecting features have different coordinate systems.

  • The output will only contain single-part geometries. Centerlines will be split at the junctions, and each path will be written as a separate feature to the output table.

Параметры

ПодписьОписаниеТип данных
Input Features

The polygon features that will be used to create the centerline.

Feature Layer
Output Feature Class

The output feature class for the centerlines.

Feature Class
Connecting Features
(Дополнительный)

The features that will be used to ensure connectivity of the centerline with other features in a network. The centerline will link to the point or the shared boundary wherever a feature from a connecting feature class touches the input feature.

Feature Layer

arcpy.topographic.PolygonToCenterline(in_features, out_feature_class, {connecting_features})
ИмяОписаниеТип данных
in_features

The polygon features that will be used to create the centerline.

Feature Layer
out_feature_class

The output feature class for the centerlines.

Feature Class
connecting_features
[connecting_features,...]
(Дополнительный)

The features that will be used to ensure connectivity of the centerline with other features in a network. The centerline will link to the point or the shared boundary wherever a feature from a connecting feature class touches the input feature.

Feature Layer

Пример кода

PolygonToCenterline example (stand-alone script)

The following stand-alone sample script demonstrates how to use the PolygonToCenterline function to create a centerline from a polygon feature.

# Name: PolygonToCenterline_sample.py
# Description: Select the rivers and produce centerlines

# Import System Modules
import arcpy

# Check Out Extensions
arcpy.CheckOutExtension('Foundation')

# Setting Local Variables
in_features = r'C:\data\CTM.gdb\CTM\HydrographySrf'
out_feature_class = r'C:\data\CTM.gdb\CTM\HydrographyCrvOut'

# Select only the Rivers subtype
inputLyr = arcpy.management.MakeFeatureLayer(in_features, "inputLyr", "FCSubtype =  100314")

# Execute Polygon To Centerline
arcpy.topographic.PolygonToCenterline(inputLyr, out_feature_class)

# Check In Extensions
arcpy.CheckInExtension("Foundation")

Параметры среды

Этот инструмент не использует параметры среды геообработки

Информация о лицензиях

  • Basic: Нет
  • Standard: Обязательно Production Mapping
  • Advanced: Обязательно Production Mapping

Связанные разделы