# 8.11.2.10 IfcCompoundPlaneAngleMeasure

## 8.11.2.10.1 Semantic definition

IfcCompoundPlaneAngleMeasure is a compound measure of plane angle in degrees, minutes, seconds, and optionally millionth-seconds of arc.

Type: LIST [3:4] OF INTEGER

Value restrictions

• The first integer measure is the number of degrees and is generally not range-restricted. However, when IfcCompoundPlaneAngleMeasure is used to express geographic coordinates, only latitudes of [-90, 90] and longitudes of [-180, 180] are used in practice.
• The second integer measure is the number of minutes and shall be in the range (-60, 60).
• The third integer measure is the number of seconds and shall be in the range (-60, 60).
• The optional fourth integer measure is the number of millionth-seconds and shall be in the range (-1 000 000, 1 000 000).

Signedness

All measure components have the same sign (positive or negative). It is therefore trivial to convert between floating point representation (decimal degrees) and compound representation regardless whether the angle is greater or smaller than zero. Example:



LOCAL a : IfcPlaneAngleMeasure := -50.975864; (* decimal degrees, -50° 58' 33" 110400 *) b : IfcPlaneAngleMeasure; c : IfcCompoundPlaneAngleMeasure; s : IfcText; END_LOCAL;

(* convert from float to compound *) c := a; -- -50 c := (a - c) * 60; -- -58 c := ((a - c) * 60 - c) * 60; -- -33 c := (((a - c) * 60 - c) * 60 - c) * 1.e6; -- -110400

(* convert from compound to float *) b := c + c/60. + c/3600. + c/3600.e6; -- -50.975864



Use in string representations

When a compound plane angle measure is formatted for display or printout, the signs of the fractional components will usually be discarded because, to a human reader, the sign of the first component alone already indicates the sense of the angle:



(* convert from compound to human-readable string *) s := FORMAT(c, '+##') + "000000B0" + FORMAT(ABS(c), '##') + '''' + FORMAT(ABS(c), '##') + '"' + FORMAT(ABS(c), '##'); -- -50° 58' 33" 110400



Another often encountered display format of latitudes and longitudes is to omit the signs and print N, S, E, W indicators instead, for example,

50&deg;58'33"S


. When stored as IfcCompoundPlaneAngleMeasure however, a compound plane angle measure is always signed, with same sign of all components.

## 8.11.2.10.3 Formal representation

TYPE IfcCompoundPlaneAngleMeasure = LIST [3:4] OF INTEGER;
WHERE
MinutesInRange : ABS(SELF) < 60;
SecondsInRange : ABS(SELF) < 60;
MicrosecondsInRange : (SIZEOF(SELF) = 3) OR (ABS(SELF) < 1000000);
ConsistentSign : ((SELF >= 0) AND (SELF >= 0) AND (SELF >= 0) AND ((SIZEOF(SELF) = 3) OR (SELF >= 0)))
OR
((SELF <= 0) AND (SELF <= 0) AND (SELF <= 0) AND ((SIZEOF(SELF) = 3) OR (SELF <= 0)));
END_TYPE;