From d73509730858bccc00cd95d2d2a689971e48591e Mon Sep 17 00:00:00 2001 From: Andrew Bell Date: Fri, 23 Mar 2018 15:05:42 +0100 Subject: [PATCH] Add support for individual dimension precisions. Close #1869 --- doc/stages/writers.text.rst | 16 ++++-- io/TextWriter.cpp | 89 ++++++++++++++++++++++++++------- io/TextWriter.hpp | 10 +++- test/unit/io/TextWriterTest.cpp | 49 ++++++++++++++++++ 4 files changed, 141 insertions(+), 23 deletions(-) diff --git a/doc/stages/writers.text.rst b/doc/stages/writers.text.rst index 4fefa14677..c51608b3d3 100644 --- a/doc/stages/writers.text.rst +++ b/doc/stages/writers.text.rst @@ -42,14 +42,24 @@ filename format Output format to use. One of "geojson" or "csv". [Default: **csv**] +precision + Decimal Precision for output of values. This can be overridden for + individual dimensions using the **order** option. [Default: 3] + order - Comma-separated list of dimension names, giving the desired column order in the output file, for example "X,Y,Z,Red,Green,Blue". [Default: none] + Comma-separated list of dimension names in the desired output order. + For example "X,Y,Z,Red,Green,Blue". Dimension names + can optionally be followed with a colon (':') and an integer to indicate the + precision to use for output. Ex: "X:3, Y:5,Z:0" If no precision is specified + the value provided with the **precision** option is used. [Default: none] keep_unspecified - Should we output any fields that are not specified in the dimension order? [Default: **true**] + If true, writes all dimensions. Dimensions specified with the **order** + option precede those not specified. [Default: **true**] jscallback - When producing GeoJSON, the callback allows you to wrap the data in a function, so the output can be evaluated in a