An annoyingly long process figuring out how to encode the nested arrays to create the ol.geom.Geometry objects, but it's all now working, and the drawing interface is now generating TEI surface elements for pasting directly into XML files. There's one remaining hiccup: single-line streets generate two points, which is not enough for the TEI @points attribute, so I need to convert those (like the single-point ones) to using the four coordinate attributes instead.