-
Notifications
You must be signed in to change notification settings - Fork 25
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
[c++] WKB geometry utilities #3149
Conversation
Move template function implementation outside of header files
f75c159
to
ed46ad2
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3149 +/- ##
==========================================
+ Coverage 83.05% 83.30% +0.25%
==========================================
Files 50 51 +1
Lines 5198 5458 +260
==========================================
+ Hits 4317 4547 +230
- Misses 881 911 +30
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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 PR is large, but very clean. I added a couple of inline comments to the review. In addition:
-
For the tests, we should (1) make it easy to add in additional tests for each type, (2) add in additional tests for different edge cases for the geometries and (3) add tests for reading and erroring out on improperly formatted and/or unsupported WKB types. None of this needs to be added to this PR, but we should at least add stories to address this in the future.
-
Optional: I think we should move
libtiledbsoma/src/utils/geometry
to justlibtiledbsoma/src/geometry
.
|
||
namespace tiledbsoma::geometry { | ||
|
||
enum class GeometryType { |
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.
It looks like this matches the integer codes in the WKB spec.
- What do you think about making this a uint32_t enum to match the spec?
- Should we specify 2D on these types in case we want to add in 3D/4D versions as well?
Address PR comments
This PR adds a basic implementation for reading and writing geometry object from and to WKB buffers.