class TherionImporter extends Importer {

    public static void updateCentreline(List<String> lines, Survey survey) throws Exception {
        List<String> block = getContentsOfBeginEndBlock(lines, "centreline");
        List<String> sanitisedCentrelineData = new LinkedList<>();
        List<String> sanitisedElevationDirectionData = new LinkedList<>();


        boolean inDataBlock = false;
        for (String line: block) {
            String trimmed = line.trim();
            if (trimmed.equals("")) {
                continue;
            }

            if (trimmed.startsWith("data")) {
                inDataBlock = true;
                continue;
            } else if (!inDataBlock) {
                continue;
            }

            if (trimmed.startsWith("extend")) {
                sanitisedElevationDirectionData.add(trimmed);
            } else {
                sanitisedCentrelineData.add(trimmed);
            }
        }

        String centrelineText = TextTools.join("\n", sanitisedCentrelineData);
        SurvexImporter.parse(centrelineText, survey);
        handleElevationDirectionData(sanitisedElevationDirectionData, survey);
    }

}