-
Notifications
You must be signed in to change notification settings - Fork 347
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
WKT writer precision #375
Comments
|
Same as above, now using pygeos >>> import pygeos
>>> p = pygeos.Geometry("POINT (654321.12345 0.1)")
>>> pygeos.io.to_wkt(p, trim=False, rounding_precision=3)
'POINT (654321.123 0.100)'
>>> pygeos.io.to_wkt(p, trim=True, rounding_precision=3)
'POINT (6.54e+05 0.1)' |
pramsey
added a commit
to pramsey/geos
that referenced
this issue
Jan 5, 2021
|
Output in "trim" mode should be closer to "expectations" in master, as of 2376cd6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using the Julia interface to GEOS, a non-consistent behavior of WKTWriter with rounding precision was observed. Original issue JuliaGeo/LibGEOS.jl#86. Used versions are LibGEOS v0.6.6 and GEOS_jll v3.9.0+0.
gives
whereas
gives
Relevant libgeos code here
geos/src/io/WKTWriter.cpp
Lines 358 to 369 in 5b722cf
Judging from http://www.cplusplus.com/reference/iomanip/setprecision/ , if
std::fixedis not in the stream,std::setprecisionsets the significant digits.The text was updated successfully, but these errors were encountered: