Open kylebarron opened 4 months ago
This is just a prototype of #199.
Based on the example here, this optionally passes down a precision parameter to the format!() call.
precision
format!()
One thing I noticed when I hard-coded format!("{x:.3} {y:.3}") is that setting that forces even integers to have 3 decimal points. E.g.
format!("{x:.3} {y:.3}")
---- geojson::geojson_reader::test::conversions stdout ---- thread 'geojson::geojson_reader::test::conversions' panicked at geozero/src/geojson/geojson_reader.rs:419:9: assertion `left == right` failed left: "POINT(10.000 20.000)" right: "POINT(10 20)"
Potentially this means what I actually want to do to solve my goal in #199 is to truncate the precision of my data, and that will automatically get printed as I want...
This is just a prototype of #199.
Based on the example here, this optionally passes down a
precision
parameter to theformat!()
call.One thing I noticed when I hard-coded
format!("{x:.3} {y:.3}")
is that setting that forces even integers to have 3 decimal points. E.g.Potentially this means what I actually want to do to solve my goal in #199 is to truncate the precision of my data, and that will automatically get printed as I want...