R_GE_P_NON_PLANAR#
Requirement#
| ID | R_GE_P_NON_PLANAR |
|---|---|
| Description | Every polygon must be planar. Planarity is achieved when no point is farther than distanceTolerance from the regression plane of all points, and the normals of every triangle of the tessellated polygon do not have an angular deviation greater than angleTolerance. |
| Parameter 1: type | The type of the planarity check can be selected. Must be one of distance, angle, both.
|
| Parameter 2: distanceTolerance | Tolerance of the distance of a point from the regression plane |
| Parameter 3: angleTolerance | Tolerance of the angle of the triangle normals |
| Error codes | GE_P_NON_PLANAR_POLYGON_DISTANCE_PLANE, GE_P_NON_PLANAR_POLYGON_NORMALS_DEVIATION |
Normal deviation:

Distance of a point to the regression plane:

Check#
| ID | C_GE_P_NON_PLANAR |
|---|---|
| Requirement ID | R_GE_P_NON_PLANAR |
| Preconditions | R_SC_SCHEMA_VALIDATION, R_GE_R_ALL |
| Description | To determine the normal deviation, all polygons are tessellated in order to compute the triangle normals, whose angles are used for the comparison. The tessellation of the polygons is not deterministic, and therefore the result of the normal deviation check is not deterministic. For the distance check, a regression plane is created from all polygon points in order to compute the distance of the points to this plane. |
| Error code | GE_P_NON_PLANAR_POLYGON_DISTANCE_PLANE, GE_P_NON_PLANAR_POLYGON_NORMALS_DEVIATION |
Implementation#
In CityDoctor2 only the distance check is active by default, since the normal check does not produce deterministic results.
Test cases#
| Test case ID | CityGML model | Expected result |
|---|---|---|
| GE-gml:PO-0002-T0001 | SimpleSolid_SrefBS-GE-gml-PO-0001-T0002.gml | OK for this requirement, GE_S_NOT_CLOSED error in later checks |
| GE-gml:PO-0002-T0002 | SimpleSolid_SrefBS-GE-gml-PO-0002-T0001.gml | GE_P_NON_PLANAR_POLYGON_DISTANCE_PLANE in _Simple_BD.1_PG.2 with distanceTolerance = 0.01 |
| GE-gml:PO-0002-T0003 | SimpleSolid_SrefBS-GE-gml-PO-0002-T0001.gml | OK for this requirement with distanceTolerance = 0.5, GE_P_ORIENTATION_RINGS_SAME in later checks |
| GE-gml:PO-0002-T0004 | SimpleSolid_SrefBS-GE-gml-PO-0002-T0002.gml | GE_P_NON_PLANAR_POLYGON_NORMALS_DEVIATION in _Simple_BD.1_PG.1 with parameter type = angle |