LandXML 1.x is the dominant legacy format for civil alignment data; IFC 4x3 is the modern target. The goal of this chapter is to guide implementers through the decisions and pitfalls that arise during conversion, drawn from practical experience implementing LX2IFC, the author's open-source LandXML to IFC conversion program. LX2IFC focuses on alignment conversion and is otherwise incomplete as a general-purpose LandXML to IFC conversion utility; it remains a work in progress.
The following table provides a high-level mapping of the two data models.
| LandXML | IFC 4x3 |
|---|---|
<Alignments> / <Alignment> |
IfcAlignment nested under IfcProject via IfcRelAggregates |
<CoordGeom> |
IfcAlignmentHorizontal nested via IfcRelNests |
<Profile> / <ProfAlign> |
IfcAlignmentVertical nested via IfcRelNests |
<Cant> |
IfcAlignmentCant nested via IfcRelNests |
<StaEquation> |
IfcReferent with stationing attributes and properties |
<Units> |
IfcUnitAssignment in IfcProject |
Table A.1-1 — LandXML to IFC schema conceptual comparison
The key conceptual difference between the two schemas is that LandXML defines geometry through PI and PVI points with derived curve parameters, whereas IFC defines geometry as explicit typed segments each carrying a start condition, length, and curve parameters.
LandXML carries explicit unit declarations (<Metric>, <Imperial>) for linear and angular measure. IFC requires all geometry in SI base units (meters, radians) or with an explicit IfcConversionBasedUnit.
Read <Units> before processing any geometry — all coordinate values depend on it.
Linear units. Convert foot and US Survey foot to meters as needed. Note that the US Survey foot and the international foot are not the same:
Using the wrong conversion factor introduces a systematic error that compounds over long alignments.
Angular units. LandXML directions can be expressed in decimal degrees, grads, or radians. IFC angular units are declared in IfcUnitAssignment — the SI base unit is radians, but IfcConversionBasedUnit can declare degrees, grads, or any other angular unit. When constructing an IFC model from LandXML, the converter controls what angular unit the output model declares; declaring radians (the default) avoids an extra conversion step and is the most common choice.
Bearing convention. LandXML directions are azimuths measured clockwise from North. IFC plane angles are measured counter-clockwise from the positive X-axis (East). The conversion is
where
The LandXML <CoordGeom> element contains a sequence of <Line>, <Curve>, and <Spiral> child elements. Each maps to an IfcAlignmentSegment nested under IfcAlignmentHorizontal.
LandXML lines and spirals often omit explicit direction attributes (Dir, DirStart) and rely on the geometry — start/end or start/PI points — to imply direction. IfcAlignmentHorizontalSegment.StartDirection is required. When the direction attribute is absent, compute it from the available geometry:
then apply the bearing-to-IFC plane angle conversion from Section A.2.
<Curve> provides center, start, end, and radius. IFC requires the start point, the start direction (the tangent direction, not the radial direction), the signed radius, and the arc length.
Compute the tangent direction from the radial line by rotating 90°:
where rot="ccw") and rot="cw"). The signed radius passed to IfcAlignmentHorizontalSegment follows the same sign convention.
The following table maps LandXML spiType values to IfcAlignmentHorizontalSegmentTypeEnum.
LandXML spiType |
IFC Type | Notes |
|---|---|---|
clothoid |
CLOTHOID |
Direct mapping |
bloss |
BLOSSCURVE |
Direct mapping |
biquadratic |
HELMERTCURVE |
Direct mapping |
biquadraticParabola |
HELMERTCURVE |
Equivalent to biquadratic |
cubic |
CUBIC |
Direct mapping |
cubicParabola |
CUBIC |
Equivalent to cubic |
cosine |
COSINECURVE |
Direct mapping |
sinusoid |
SINECURVE |
Direct mapping |
sineHalfWave |
COSINECURVE |
Approximation — loss of fidelity, see note below |
japaneseCubic |
VIENNESEBEND |
Direct mapping |
revBiquadratic |
— | IFC mapping unknown, log warning and skip |
revBloss |
— | IFC mapping unknown, log warning and skip |
revCosine |
— | IFC mapping unknown, log warning and skip |
revSinusoid |
— | IFC mapping unknown, log warning and skip |
radioid |
— | IFC mapping unknown, log warning and skip |
weinerBogen |
— | IFC mapping unknown, log warning and skip |
Table A.3.4-1 — LandXML spiType to IFC type mapping
Note: The LandXML specification describes the sine half-wavelength spiral as an approximation of a cosine spiral. Mapping it to
COSINECURVEis therefore reasonable but not exact. Implementations should log a warning when this substitution is made.
LandXML uses rot="cw" / rot="ccw" to indicate curve direction. IFC encodes direction in the sign of StartRadiusOfCurvature and EndRadiusOfCurvature: a positive value indicates a left turn (counter-clockwise) and a negative value indicates a right turn (clockwise).
Apply this sign to both StartRadiusOfCurvature and EndRadiusOfCurvature.
LandXML represents an infinite start or end radius by omitting the attribute or by supplying the value INF. IFC uses 0.0 in IfcAlignmentHorizontalSegment.StartRadius or EndRadiusOfCurvature to indicate an infinite radius. Substitute 0.0 whenever the LandXML value is absent or is INF.
LandXML represents vertical geometry as a sequence of PVI-based elements under <ProfAlign>: <PVI>, <ParaCurve>, <UnsymParaCurve>, and <CircCurve>. This is fundamentally different from IFC’s segment-based model, which requires an explicit start station, start elevation, start grade, end grade, and length for each segment.
The core translation challenge is that LandXML locates vertical curves by their PVI station and curve length, while IFC needs each segment’s start station explicitly. The conversion procedure is:
- Compute the entry grade from the PVI station and the previous PVI or curve endpoint.
- The start station of a symmetric parabolic curve is
$\text{PVI station} - L/2$ . - The start elevation is computed by projecting back from the PVI along the entry grade:
$e_{start} = e_{PVI} - g_1 \cdot L/2$ . - Gradient segments fill any gap between the end of one curve and the start of the next.
This is the standard vertical curve case. Given PVI station
Map to IfcAlignmentVerticalSegment with PredefinedType = PARABOLICARC, StartDistAlong = s_{start} - s_{alignment\_start}, StartHeight = e_{start}, StartGradient = g_1, EndGradient = g_2, HorizontalLength = L.
IFC has no asymmetric vertical curve type. The <UnsymParaCurve> must be split into two abutting PARABOLICARC segments. Given entry length
Compute the vertical offset from the composite curve to the PVI:
The transition point between the two sub-curves occurs at the PVI station with elevation:
The intermediate grade at the transition point is:
Create two PARABOLICARC segments: the first from the curve start to the PVI station with grades
LandXML provides the radius and arc length. IFC IfcAlignmentVerticalSegment for CIRCULARARC accepts the radius directly in the RadiusOfCurvature attribute. Compute the start station and elevation the same way as for a symmetric parabolic arc, using
LandXML vertical profile elements are positioned by station. IfcAlignmentVerticalSegment.StartDistAlong is distance along the horizontal alignment measured from the alignment start — a continuous value with no breaks. These are not the same thing whenever station equations are present.
In the simplest case — no station equations — the conversion is:
where <Alignment staStart="...">.
When station equations are present, the station numbering is discontinuous: a gap or overlap at each equation point means a given station value does not map to a unique physical distance without knowing which zone it falls in. The conversion must walk the list of <StaEquation> elements in order, accumulating the physical distance up to each equation point, then apply the appropriate offset for the zone containing the target station. The staInternal attribute on <StaEquation> gives the continuous internal distance and can serve as a cross-check.
LandXML <Cant> uses <CantStation> points and <CantSegment> elements with left and right cant values at the start and end of each segment, along with a curve type designation.
Each <CantSegment> maps to an IfcAlignmentCantSegment with StartCantLeft, StartCantRight, EndCantLeft, EndCantRight, and PredefinedType. The cant segment type mapping follows the same spiral type table as horizontal alignment (Section A.3.4).
IfcAlignmentCant.RailHeadDistance is the distance between rail heads (track gauge). In LandXML, this value is the gauge attribute on the <Cant> element:
<Cant name="001" gauge="1.524" rotationPoint="insideRail">Map gauge directly to IfcAlignmentCant.RailHeadDistance. The value is in the model's declared length units.
The rotationPoint attribute on <Cant> indicates which point on the cross-section serves as the pivot for superelevation rotation. LandXML defines three values: insideRail, centerline, and outsideRail. The curvature attribute on each <CantStation> indicates whether the curve is clockwise (cw, right turn) or counter-clockwise (ccw, left turn), which determines which physical rail is on the inside or outside.
IfcAlignmentCantSegment has no explicit rotation point attribute. Instead, rotation point is encoded implicitly through the combination of StartCantLeft, StartCantRight, EndCantLeft, and EndCantRight values. A zero cant value on one side indicates the pivot is on that side; equal and opposite values indicate centerline rotation.
Table A.5.4-1 gives the IFC cant values in terms of the LandXML appliedCant magnitude curvature and rotationPoint:
curvature |
rotationPoint |
CantLeft |
CantRight |
|---|---|---|---|
ccw (left turn, right = outside) |
insideRail |
||
ccw (left turn, right = outside) |
centerline |
||
ccw (left turn, right = outside) |
outsideRail |
||
cw (right turn, left = outside) |
insideRail |
||
cw (right turn, left = outside) |
centerline |
||
cw (right turn, left = outside) |
outsideRail |
Table A.5.4-1 — LandXML curvature and rotationPoint to IFC CantLeft/CantRight mapping
Apply the same logic to both the start and end values of each segment. The rotationPoint is constant for the entire <Cant> element; curvature and appliedCant are read from each <CantStation> and applied to the corresponding segment start and end positions.
The LandXML <Alignment staStart="..."> attribute gives the station at the beginning of the alignment. Map this to an IfcReferent with PredefinedType = STATION, with the station value stored in Pset_Stationing.Station. See Chapter 9 for the full IfcReferent and Pset_Stationing structure.
LandXML <StaEquation> records station breaks where the back station and ahead station differ. Each equation maps to an additional IfcReferent. The relevant attributes are:
| LandXML Attribute | Meaning |
|---|---|
staBack |
Station value before the equation (incoming) |
staAhead |
Station value after the equation (outgoing) |
staInternal |
Continuous internal station (no breaks) |
Table A.6.2-1 — LandXML station equation attributes
Map each <StaEquation> to an IfcReferent as follows:
staBack→Pset_Stationing.IncomingStation(the station value on the incoming side of the break)staAhead→Pset_Stationing.Station(the station value on the outgoing side)staInternal→ theDistanceAlongvalue inIfcPointByDistanceExpressionfor the referent'sIfcLinearPlacement
staInternal is the continuous internal distance along the alignment with no station breaks. It is therefore the correct value to use as DistanceAlong — it maps directly to arc-length along the horizontal curve without any equation adjustment. If staInternal is absent, compute DistanceAlong by walking the equation list as described in Section A.4.6.
The resulting IfcReferent instances, including the starting station referent from A.6.1, are nested under the IfcAlignment via a dedicated IfcRelNests relationship in order of increasing DistanceAlong. See Chapter 9 for the complete IfcReferent structure, the nesting requirements, and the algorithm for converting station labels to DistanceAlong when equations are present.