rhoneyager / libicedb

A toolbox for snow particle modeling!
https://rhoneyager.github.io/libicedb
Other
0 stars 1 forks source link

Negative dipole coordinates #12

Closed DaveOri closed 6 years ago

DaveOri commented 6 years ago

At the moment the code only accepts positive integers as dipole coordinates (uint64_t). When parsing shapefiles if a negative coordinate -x is encountered this is automatically transformed to x

I have a lot of shapefiles centered around the origin which then includes negative coordinates. Are there good reasons to not assume signed integers as dipole coordinates?

rhoneyager commented 6 years ago

Good point. I'm used to handling files with only unsigned coordinates. Let me do some cleanup with the parsers and storage backend over the weekend, and I'll apply a fix.

rhoneyager commented 6 years ago

Quick fix: set particle_scattering_element_coordinates_are_integral=0 will write the points as floats. Otherwise, see changes in pull request.