ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for 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
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Snap Pour Point

Available with Spatial Analyst license.

  • Summary
  • Usage
  • Syntax
  • Code Sample
  • Environments
  • Licensing Information

Summary

Snaps pour points to the cell of highest flow accumulation within a specified distance.

Usage

  • The Snap Pour Point tool is used to ensure the selection of points of high accumulated flow when delineating drainage basins using the Watershed tool. Snap Pour Point will search within a snap distance around the specified pour points for the cell of highest accumulated flow and move the pour point to that location.

  • If the input pour point data is a point feature class, it will be converted to a raster internally for processing.

  • The output is an integer raster when the original pour point locations have been snapped to locations of higher accumulated flow.

  • When there is only one input pour point location, the extent of the output is that of the accumulation raster. If there is more than one pour point location, the extent of the output is determined by the settings in the Output extent environment.

  • When specifying the input pour point locations as feature data, the default field will be the first available valid field. If no valid fields exist, the ObjectID field (for example, OID or FID) will be the default.

  • See Analysis environments and Spatial Analyst for additional details on the geoprocessing environments that apply to this tool.

Syntax

SnapPourPoint (in_pour_point_data, in_accumulation_raster, snap_distance, {pour_point_field})
ParameterExplanationData Type
in_pour_point_data

The input pour point locations that are to be snapped.

For a raster input, all cells that are not NoData (that is, have a value) will be considered pour points and will be snapped.

For a point feature input, this specifies the locations of cells that will be snapped.

Raster Layer | Feature Layer
in_accumulation_raster

The input flow accumulation raster.

This can be created with the Flow Accumulation tool.

Raster Layer
snap_distance

Maximum distance, in map units, to search for a cell of higher accumulated flow.

Double
pour_point_field
(Optional)

Field used to assign values to the pour point locations.

If the pour point dataset is a raster, use Value.

If the pour point dataset is a feature, use a numeric field. If the field contains floating-point values, they will be truncated into integers.

Field

Return Value

NameExplanationData Type
out_raster

The output pour point raster where the original pour point locations have been snapped to locations of higher accumulated flow.

This output is of integer type.

Raster

Code Sample

SnapPourPoint example 1 (Python window)

This example snaps pour points to the cell of highest flow accumulation within a specified distance.

import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
outSnapPour = SnapPourPoint("pourpoint", "flowaccumulation.img", 5,"VALUE") 
outSnapPour.save("c:/sapyexamples/output/outsnpprpnt01")
SnapPourPoint example 2 (stand-alone script)

This example snaps pour points to the cell of highest flow accumulation within a specified distance.

# Name: SnapPourPoints_Ex_02.py
# Description: Snaps pour points to the cell of highest 
#              flow accumulation within a specified distance.
# Requirements: Spatial Analyst Extension

# Import system modules
import arcpy
from arcpy import env
from arcpy.sa import *

# Set environment settings
env.workspace = "C:/sapyexamples/data"

# Set local variables
inPourPoint = "pourpoint"
inFlowAccum = "flowaccumulation.img"
tolerance = 5
pourField = "VALUE"

# Check out the ArcGIS Spatial Analyst extension license
arcpy.CheckOutExtension("Spatial")

# Execute SnapPourPoints
outSnapPour = SnapPourPoint(inPourPoint, inFlowAccum, tolerance, 
                            pourField) 

# Save the output 
outSnapPour.save("c:/sapyexamples/output/outsnpprpnt02")

Environments

  • Auto Commit
  • Cell Size
  • Compression
  • Current Workspace
  • Extent
  • Geographic Transformations
  • Mask
  • Output CONFIG Keyword
  • Output Coordinate System
  • Raster Statistics
  • Scratch Workspace
  • Snap Raster
  • Tile Size

Licensing Information

  • ArcGIS for Desktop Basic: Requires Spatial Analyst
  • ArcGIS for Desktop Standard: Requires Spatial Analyst
  • ArcGIS for Desktop Advanced: Requires Spatial Analyst

Related Topics

  • An overview of the Hydrology toolset
Feedback on this topic?

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal