MCPcopy
hub / github.com/opengeos/segment-geospatial / FeatureLine

Function FeatureLine

samgeo/fer.py:605–615  ·  view source on GitHub ↗
(vList, vx, angleDiff, lengthdiff1, lengthdiff2)

Source from the content-addressed store, hash-verified

603
604
605def FeatureLine(vList, vx, angleDiff, lengthdiff1, lengthdiff2):
606 avList = []
607 for i in range(len(vList)):
608 v1 = vList[i]
609 minAngle = min([v1.cos(vx), math.fabs(v1.cos(vx) - 90), 180 - v1.cos(vx)])
610 if (minAngle < angleDiff and v1.length() > lengthdiff1) or (
611 v1.length() > lengthdiff2
612 ):
613 avList.append(v1)
614
615 return avList
616
617
618def LineRelation(v1, v2, vx, angleDiff, lenthDiff, area):

Callers 2

LocalRescFunction · 0.85
regularizeFunction · 0.85

Calls 2

cosMethod · 0.80
lengthMethod · 0.80

Tested by

no test coverage detected