ArcGIS Desktop

  • Documentation
  • Support

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

ArcMap

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

Generate Points Along Lines

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

Summary

Creates point features along lines at fixed intervals or by percentage.

Usage

  • The attributes of the input features will be maintained in the output feature class. A new field, ORIG_FID, will be added to the output feature class and set to the input feature IDs.

Syntax

GeneratePointsAlongLines_management (Input_Features, Output_Feature_Class, Point_Placement, {Distance}, {Percentage}, {Include_End_Points})
ParameterExplanationData Type
Input_Features

The line features to be converted into points.

Feature Layer
Output_Feature_Class

The point feature class that will be created from the input lines.

Feature Class
Point_Placement
String
Distance
(Optional)

The interval from the beginning of the line at which points are placed along the line.

Linear Unit
Percentage
(Optional)

The percentage from the beginning of the line at which points will be placed. For example, if a percentage of 40 is used, points will be placed at 40 percent and 80 percent of the line's distance.

Double
Include_End_Points
(Optional)

Specifies whether additional points are placed at the start point and end point of the line.

  • END_POINTS —Additional points will be added at the start point and end point of the line.
  • NO_END_POINTS —No additional points will be added at the start point and end point of the line. This is the default.
Boolean

Code sample

GeneratePointsAlongLines Example 1 (Python window)

The following Python window script demonstrates how to use the GeneratePointsAlongLines function in immediate mode.

import arcpy
arcpy.env.workspace = 'C:/data/base.gdb'
arcpy.GeneratePointsAlongLines_management('rivers', 'distance_intervals', 'DISTANCE', Distance='500 meters')
arcpy.GeneratePointsAlongLines_management('rivers', 'percentage_intervals', 'PERCENTAGE', Percentage=10)
GeneratePointsAlongLines Example 2 (stand-alone script)

The following stand-alone script demonstrates how to use GeneratePointsAlongLines.

# Name: GeneratePointsAlongLines_Example2.py
# Description: Convert point features into line features

import arcpy

# Set environment settings
arcpy.env.workspace = 'C:/data/base.gdb'

# Set local variables
in_features = 'rivers'
out_fc_1 = 'distance_intervals'
out_fc_2 = 'percentage_intervals'

# Execute GeneratePointsAlongLines by distance
arcpy.GeneratePointsAlongLines_management(in_features, out_fc_1, 'DISTANCE',
                                          Distance='500 meters')

# Execute GeneratePointsAlongLines by percentage
arcpy.GeneratePointsAlongLines_management(in_features, out_fc_2, 'PERCENTAGE',
                                          Percentage=10,
                                          Include_End_Points='END_POINTS')

Environments

  • Current Workspace
  • Output CONFIG Keyword
  • Output Spatial Grid 1
  • Output Spatial Grid 2
  • Output Spatial Grid 3

Licensing information

  • ArcGIS Desktop Basic: Yes
  • ArcGIS Desktop Standard: Yes
  • ArcGIS Desktop Advanced: Yes

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

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

About Esri

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