Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass formatter parameters to WKT writer #200

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kylebarron
Copy link
Collaborator

This is just a prototype of #199.

Based on the example here, this optionally passes down a precision parameter to the format!() 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.

---- 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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant