arcpy GIS提取线段要素的所有端点坐标(startPoint、endPoint):
import arcpy
from arcpy import env
# Set environment settings
env.workspace = "C:/data"
inFeatures = "majorrds.shp"
outFeatureClass = "c:/output/output.gdb/majorrds_midpt"
# Execute FeatureVerticesToPoints
# 参数为“BOTH_ENDS”获取起始点startPoint、终点endPoint
arcpy.FeatureVerticesToPoints_management(inFeatures, outFeatureClass, "BOTH_ENDS")