src.tests.simple_curve_evaluation_test

Classes

SimpleCurveEvaluationTest()

class src.tests.simple_curve_evaluation_test.SimpleCurveEvaluationTest
Author:

Alberto M. Esmoris Pena

Test for SimpleCurveEvaluator exercising the end-to-end in-memory channel: it runs the SimpleCurveExtractor on a real point cloud, fetches the curves directly via SimpleCurveExtractor.get_curves_dict() and feeds them to the evaluator without ever serialising a Shapefile.

Hyperparameters are baked into SCE_KWARGS and EVAL_KWARGS as a frozen snapshot of the H37h winner configuration so the test does not depend on any file outside the repository (the only external read is the LAS fixture in test_data/).

Asserts the expected production thresholds:

  • Coverage > 98.5 %

  • Deviation < 1.5 % (length-anchored over the polyline 3D arc; see SimpleCurveEvaluator)

  • Hallucinated features == 0

  • Self-intersections == 0

  • Gaps == 0

INPUT_LAS = 'test_data/curve_points.laz'
COVERAGE_MIN_PCT = 98.5
DEVIATION_MAX_PCT = 1.5
MAX_HALLUCINATED_FEATURES = 0
MAX_SELF_INTERSECTIONS = 0
MAX_GAPS = 0
SCE_KWARGS = {'angular_threshold_k': 1.5, 'betweenness_percentile': 0.05, 'chain_radius_factor': 3.0, 'cid_gap_split_dz_threshold': None, 'cid_gap_split_enable': True, 'cid_gap_split_planar_radius': 15.0, 'cid_relabel_z_disjoint_enable': True, 'cid_relabel_z_disjoint_threshold': None, 'curve_classes': [4], 'curve_pcloud': None, 'curve_pcloud_step': None, 'curve_source': 'classification', 'endpoint_extension_enable': True, 'endpoint_extension_max_length': None, 'endpoint_extension_radius': None, 'endpoint_extension_step': None, 'epsg': 25829, 'final_cleanup': False, 'hallucination_drop_densify_step': None, 'hallucination_drop_enable': True, 'hallucination_drop_radius': None, 'hallucination_drop_threshold': 0.025, 'hallucination_min_supported_length': None, 'max_merge_iterations': 3, 'merge_orphans_enable': True, 'merge_radius': 15.0, 'min_curve_length': 0.0, 'min_segment_length': 3.0, 'min_twig_length': None, 'min_voxel_size': 0.1, 'nthreads': -1, 'occupancy_threshold': 0.1, 'output_csv': None, 'output_gpkg': None, 'output_point_spacing': 0.0, 'output_shp': None, 'propagate_labels': False, 'rdp_tolerance': None, 'ridge_fraction': 0.5, 'slope_output_form': 'angle_deg', 'snap_densify_step': None, 'snap_enable': True, 'snap_max_shift': None, 'snap_min_neighbors': 4, 'snap_passes': 30, 'snap_post_passes': 20, 'snap_pull_radius': None, 'snap_smoothing_iterations': 2, 'snap_target_radius': None, 'snap_truncate_iterations': 15, 'spatial_scale': 1.5, 'tangent_smoothing_iterations': 3, 'z_consistency_sigma': 0.0, 'z_tolerance': 2.0}
EVAL_KWARGS = {'coverage_radius': 3.0, 'curve_class': 4, 'densify_step': 0.5, 'deviation_radius': 2.0, 'exclude_t_junctions': True, 'gap_eps': 1e-06, 'gap_radius': 15.0, 'hallucination_feature_threshold': 0.025, 'hallucination_radius': 2.5, 't_radius': 5.0}
__init__()

Basic configuration for any VL3D test.

Parameters:

name (str) – Test name

run()

Run the SimpleCurveEvaluator quality test.

Returns:

True if all KPIs meet the thresholds.

Return type:

bool