ouch... we should probably extract the Polyline Format class into a separate file then