<div dir="ltr"><div dir="ltr"><div> setTrim and setRoundingPrecision are GEOS-specific (not in JTS).</div><div><br></div><div>What JTS has is WKTWriter.setPrecisionModel().  What that does is to set the max number of decimal places according to the precision supplied (e.g. scale = 10 produces 1 decimal, scale = 100 produces 2, etc) </div><div><br></div><div>I like the simplicity of having setRoundingPrecision always apply to the decimal places.  I can't really envision a scenario where there is any point in reducing the sig figs (i.e. lopping off digits to the L of the decimal place) since they would have to be output as zeroes anyway, so there is no savings.</div><div><br></div><div>And I would think having trim = true as the default would be most friendly, since there doesn't seem to be any value in keeping trailing zeroes after the decimal point.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 5, 2021 at 3:41 PM Paul Ramsey <<a href="mailto:pramsey@cleverelephant.ca">pramsey@cleverelephant.ca</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
What do people think is the best practice for outputing WKT precision? </blockquote><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
(Also, what do these knobs (setTrim, setRoundingPrecision) mean in JTS world? I'm guessing our behaviour is *not* an exact analogue.<br></blockquote><div><br></div></div></div>