Here's a script I put together. The script uses your point and your line feature class, and outputs a new line feature class of line features as desired. The basic steps:
- Iterate through points
- Create a buffer around each point
- Create East-West line from each point. This will be used to slice
your buffer in half
- Create point north of each input point. This will be used to select
northern buffer half
- Slice the buffer in half with Feature to Polygon
- Select northern half with northern point
- Add all northern buffers to new feature class
- Clip input line feature class by northern buffers
Note that the script assumes a northern direction means an increase in the y-value of a point's coordinate. I've commented out a different line if the opposite is true. You should find it with my comments.
Also note that your input point feature class needs to be in a projected coordinate system.
Inputs:
- pntFc: Full path to your point feature class
- lineFc: Full path to your line feature class you wish to slice up
- bufferDist: Distance in meters for your buffer
- workspace: in_memory or a file geodatabase to store intermediate data
- outLineFC: Full path of line output
- outBufferFC: Full path of half-buffer output
Script:
#Locals-----------
"""
Creates northerly buffers from point data set
Intersects line feature class
"""
#Input point feature class
pntFc = r"C:\temp\temp.gdb\testpnt"
#Input line feature class
lineFc = r"C:\temp\temp.gdb\testline"
#Buffer distance in meters
## 3 miles * 1609.34 = 4828.03
bufferDist = 4828.03
#Workspace
workspace = r"in_memory"
#Full path of line output
outLineFC = r"C:\temp\temp.gdb\testline_out2"
#Full path of buffer output
outBufferFC = r"C:\temp\temp.gdb\buffer_out"
#End locals -----------
#Import modules
print "Importing modules"
from arcpy import *
import os
#Optional: overwrite output
#Will allow for overwriting feature classes in workspace
env.overwriteOutput = True
#Get spatial reference to determine feature class meter unit conversion
SR = Describe (pntFc).spatialReference
metersPerUnit = SR.metersPerUnit
#Create empty line feature class for east/west line - used for slicing
ewLineFc = os.path.join (workspace, "sliceLine")
CreateFeatureclass_management (workspace, "sliceLine", "POLYLINE", spatial_reference = SR)
#Create empty point feature class for northerly point - used for selecting northern half of buffer
nPointFc = os.path.join (workspace, "nPoint")
CreateFeatureclass_management (workspace, "nPoint", "POINT", spatial_reference = SR)
#Creater empty polygon to store northerly buffers
bufferHalfs = os.path.join (workspace, "bufferHalfs")
CreateFeatureclass_management (workspace, "bufferHalfs", "POLYGON", spatial_reference = SR)
#Empty list to store northern buffers
northBuffs = []
#Iterate points
print "Creating northernly half-buffers"
with da.SearchCursor (pntFc, ["SHAPE@X", "SHAPE@Y", "SHAPE@"]) as cursor:
for xCoor, yCoor, shape in cursor:
#Buffer feature class
bufferFc = os.path.join (workspace, "buffer")
Buffer_analysis (shape, bufferFc, "%s Meters" % str(bufferDist))
###Create east-west line feature class ------
#Array object
array = Array()
#Create easterly and westerly points
ePoint = Point()
ePoint.Y = yCoor
ePoint.X = xCoor + (bufferDist / metersPerUnit) + 1
wPoint = Point()
wPoint.Y = yCoor
wPoint.X = xCoor - (bufferDist / metersPerUnit) - 1
array.add (ePoint)
array.add (wPoint)
#Create easterly/westerly line
line = Polyline (array)
#Add line to east-west line feature class
inCurs = da.InsertCursor (ewLineFc, ["SHAPE@"])
inCurs.insertRow ((line,))
del inCurs
##Done creating east-west line feature class -----
###Create northerly point ------
###Allows selection of northern buffer
#Northerly point
nPoint = Point()
nPoint.Y = yCoor + ((bufferDist / metersPerUnit) /2) #Assumes increased coordinate == north
#If north == minusing y Coordinate use:
#nPoint.Y = yCoor - ((bufferDist / metersPerUnit) /2)
nPoint.X = xCoor
#Add point to north point feature class
inCurs = da.InsertCursor (nPointFc, ["SHAPE@"])
inCurs.insertRow ((nPoint,))
del inCurs
##Done creating northerly point ------------
#Slice buffer
slicedBufferFc = os.path.join (workspace, "sliceBuffer")
FeatureToPolygon_management ([bufferFc, ewLineFc], slicedBufferFc)
#Make feature layer to select northerly half of buffer
MakeFeatureLayer_management (slicedBufferFc, "sliceLyr")
#Select sliced layer by northerly point
SelectLayerByLocation_management ("sliceLyr", "", nPointFc)
#Get shape object from buffer selection
northShape = [r[0] for r in da.SearchCursor ("sliceLyr", "SHAPE@")][0]
#Add buffer half to list
northBuffs += [northShape]
#Clean up
for fil in ["sliceLyr", slicedBufferFc, bufferFc]:
Delete_management (fil)
for fc in [nPointFc, ewLineFc]:
DeleteRows_management (fc)
#Insert cursor to add buffers to feature class
print "Creating split buffer feature class"
cursor = da.InsertCursor (bufferHalfs, "SHAPE@")
for half in northBuffs:
cursor.insertRow ((half,))
del cursor
print "Clipping"
#Clip buffer halfs with input line feature class
Clip_analysis (lineFc, bufferHalfs, outLineFC)
print "Created:", outLineFC
#Export buffer feature class
buffName = os.path.basename (outBufferFC)
buffPath = os.path.dirname (outBufferFC)
FeatureClassToFeatureClass_conversion (bufferHalfs, buffPath, buffName)
print "Created:", outBufferFC
for fc in [bufferHalfs, ewLineFc, nPointFc]:
Delete_management (fc)
print "Done"
Input example:

Result:

Let me know if you have any questions!