-
Notifications
You must be signed in to change notification settings - Fork 228
Symmetrizing read/write wkt #670
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although needs some changes, it's looking good.
Please, consider also
- new example in
oc/src/examples/io/
- finding if there is place for documentation (look for
.qbk
files for otherwkt
functions)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is getting complete. I just pointed out a bunch of issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK to me. Thanks!
@sudo-panda FYI, next time you update your PR, then documentation and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sudo-panda Thanks for another round of your efforts. This to me is looking good, just having two minor requests.
@sudo-panda If you update your PR, you will get #680 change and GitHub Actions will CI check it for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me and ready to merge.
If no objections arrive from @awulkiew or @vissarion in next days, I'll merge it.
I assume @barendgehrels generally agrees on such utility functions as per his #654 (comment) and #654 (comment)
@sudo-panda Thanks for your work!
@mloskot thanks for the guidance and approving the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks I am ok with merging.
- Add example demonstrating use of `significant_digits` in `to_wkt` - Add example demonstrating use of `significant_digits` in `wkt` - Add parameter documentation
- Add test for `to_wkt` and `wkt`
- Check if significant digit `<0` instead of `==-1` - Check if type is arithmetic in append function
- Set precision to `digits10` when `T` is specialized and the user doesn't specify the precision - Set precision to the user supplied precision in all other cases
- Overload function w.r.t. `significant_digits` parameter
- to_wkt() now internally calls wkt() - minor change: added copyright to read.hpp
Using alias-declaration instead of typedef
cc31ea9
to
0839e31
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am also OK with merging most of this PR but (as @barendgehrels ) I do not understand exactly what to_wkt
adds on top of the stream operator.
@barendgehrels @vissarion This PR implements this issue: #654 |
Right, thanks! So it seems there is user need so I will not go against. I am OK with this PR. |
Yes, there seem to be a need indeed. Although the lengthy discussion we've had on this PR may given an impression it's a big feature, it is not. |
Thanks for the link (I mean the one with issue #654) . Yes, I remember now and I was OK back then, so I'm still OK now. I will approve. |
I apologize it took so long. Thanks for this PR! |
This PR fixes #654 . It adds the following:
to_wkt
: This function converts the given geometry to wkt string and returns it instead of modifying a stringstream taken as input likewkt
.from_wkt
: This function returns the geometry obtained by parsing a wkt string instead of taking in a geometry variable as parameter and storing the geometry in it.to_wkt
andfrom_wkt
are provided with basically follow the template of already implementedread_wkt
andwkt
tests.This PR is now ready to be reviewed and then merged.