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

Set coordinate precision to millimeter #23

Open
balazsdukai opened this issue Jun 18, 2020 · 2 comments
Open

Set coordinate precision to millimeter #23

balazsdukai opened this issue Jun 18, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@balazsdukai
Copy link
Member

Supposedly the precision of the coordinates is set to 6 digits, while 3 decimal places (millimeter) should suffice.

[...] There is a precision difference between the TIN (up to 3 digits after the comma) and the buildings shapefile (up to 6 digits after the comma) that we use to get the reflection points. [...]

The TIN comes from 3dfier.

@balazsdukai balazsdukai added the enhancement New feature or request label Jun 18, 2020
@Ylannl
Copy link
Member

Ylannl commented Jun 18, 2020

Building coordinates are shifted to towards the origin and then represented as float. There is no way to set the precision in this plugin. It's just floating point arithmetic.

In some OGR drivers it is possible to specify a precision, but for most (GPKG, SHP) I assume they also just use a float. Eg WKB seems to use 64bit floats as well: https://mariadb.com/kb/en/well-known-binary-wkb-format/ . So not possible to control the precision as far as I understand.

@balazsdukai
Copy link
Member Author

Good point.

The 3 decimal places comes from text based formats, eg. cityjson, obj, where the coordinates in the 3dfier output are rounded up (or truncated?) to 3 dp.

But since this plugin's primary output is postgis, then we'll handle the precision when exporting from postgis.

I'm going to leave this open here, because I'm not sure where else to put it for now.

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

No branches or pull requests

2 participants