fix(ground): 지형이 아닌 일정 EL 객체(기호·윤곽선)를 높이 정합성으로 제외
- reject_height_outliers: 반경 15 m(부족 시 45 m) 내 서로 다른 높이 값의 중앙값과 비교 - |편차| > 10 m 이고 주변 높이 범위 밖으로 5 m 초과 시에만 제외, 최악 높이 묶음부터 반복 - 1 mm 이내 높이는 같은 묶음(CAD 부동소수 오차), 제외 수는 rejected_height_outliers로 기록 - 운곡교: EL 5.624(306)·-112.719(16)만 제외, 격자 최저 -85.98→21.50 m, 8 m 초과 튐 88→1 - 산외: -22.21·127.4 제외, 봉우리 후보 87.35 유지 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d740406a8c
commit
b2bebe47eb
2 files changed
+63
-3
No files matched your search
@@ -25,4 +25,23 @@ class SurveyPolylineTests(unittest.TestCase):
|
||||
doc=ezdxf.new();doc.modelspace().add_polyline3d([(1,1,20),(2,2,30),(3,3,40)])
|
||||
with self.assertRaises(ValueError):read_survey_block(Path('unused.dxf'),self.options(),doc=doc)
|
||||
|
||||
def contours(self,msp,levels):
|
||||
for k,z in enumerate(levels):
|
||||
msp.add_lwpolyline([(0,10*k),(200,10*k)],dxfattribs={'elevation':z})
|
||||
|
||||
def test_stray_constant_height_symbols_are_rejected(self):
|
||||
# Ungok case: dense short ticks at EL 5.624 and a few at -112.719 among 20-40 m contours.
|
||||
doc=ezdxf.new();msp=doc.modelspace();self.contours(msp,[28,29,30,31,32,33])
|
||||
for i in range(60):msp.add_lwpolyline([(40+2*i,20),(40+2*i,22)],dxfattribs={'elevation':5.624})
|
||||
for i in range(4):msp.add_lwpolyline([(100+i,25),(100+i,27)],dxfattribs={'elevation':-112.719})
|
||||
points,counts,_=read_survey_block(Path('unused.dxf'),self.options(),doc=doc)
|
||||
self.assertEqual(counts['rejected_height_outliers'],64)
|
||||
self.assertGreaterEqual(points[:,2].min(),28)
|
||||
|
||||
def test_real_peak_above_contours_is_kept(self):
|
||||
doc=ezdxf.new();msp=doc.modelspace();self.contours(msp,[70,72,74,76,78,80])
|
||||
msp.add_lwpolyline([(100,25),(100,27)],dxfattribs={'elevation':84})
|
||||
points,counts,_=read_survey_block(Path('unused.dxf'),self.options(),doc=doc)
|
||||
self.assertNotIn('rejected_height_outliers',counts);self.assertEqual(points[:,2].max(),84)
|
||||
|
||||
if __name__=='__main__':unittest.main()
|
||||
Reference in new issue
Block a user