ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Hydro Centerline

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Converts hydrographic polygon features into individual polyline centerlines. This tool is used by the ArcGIS Defense Mapping solution to create polyline hydrographic features at scales where a polygon feature is inappropriate or not useful. It produces an approximate centerline from input polygons. This centerline serves as a polyline representation of the original polygon feature.

Legacy:

This is a deprecated tool. This functionality has been replaced by the Production Centerline tool.

Usage

  • This tool creates one polyline centerline for each input hydro area polygon.

  • This tool will copy attribute values from Hydro Area Input Features to Hydro Polyline Output Features if both share identical field names and definitions.

  • Hydro Area Input Features and Hydro Polyline Output Features must have the same coordinate system.

Syntax

arcpy.defense.EGBHydroCenterline(in_polygon_features, in_polyline_features)
ParameterExplanationData Type
in_polygon_features

The polygon features from which centerlines will be generated.

Feature Layer
in_polyline_features

A preexisting polyline feature class.

Feature Layer

Code sample

HydroCenterline example (stand-alone script)

The following stand-alone script demonstrates how to use the HydroCenterline tool.

# HydroCenterline_Example.py
# Requirements: ArcGIS Defense Mapping solution, 3D Analyst extension, Spatial Analyst extension
 
# Import arcpy module
import arcpy

# Check out the necessary licenses
arcpy.CheckOutExtension("3d")
arcpy.CheckOutExtension("foundation")
arcpy.CheckOutExtension("defense")

arcpy.env.workspace = "c:\\data\\HydroTest.gdb"

inPolyFeatures = "HydrographySrf"
inPolylineFeatures = "HydrographyCrv"

# Create 2 feature layers for processing
arcpy.MakeFeatureLayer_management(inPolyFeatures,'inPolyFeats')
arcpy.MakeFeatureLayer_management(inPolylineFeatures,'inPolyLineFeats')

# execute the EGB Hydro Centerline tool
arcpy.EGBHydroCenterline_defense('inPolyFeats', 'inPolyLineFeats')
print arcpy.GetMessages()

# Check in the licenses
arcpy.CheckInExtension("3d")
arcpy.CheckInExtension("foundation")
arcpy.CheckInExtension("defense")

Environments

  • Current Workspace

Licensing information

  • Basic: No
  • Standard: Requires Defense Mapping and Spatial Analyst and 3D Analyst
  • Advanced: Requires Defense Mapping and Spatial Analyst and 3D Analyst

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal