Writes parameters for describing boundary segments
If present, filename, where to write, otherwise writes parameters to stdout