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

[c++] Geometry Dataframe [draft] #3201

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

XanthosXanthopoulos
Copy link
Collaborator

This PR adds a C++ implementation for SOMAGeometryDataFrame. The implementation differs from other SOMAArray derived objects in a few areas:

  • SOMAGeometryDataFrame requires two schemas to create itself, one schema similar to all other objects and a schema for the spatial axes. The second schema is necessary to create some additional internal dimension to allow indexing for geometry data.
  • SOMAGeometryDataFrame can transform geometry data from a list of vertices to the on-disk WKB format automatically. Specifically if the array of data contains a list of vertices in the geometry column (opposed to a binary buffer), the WKB buffer as well as any additional index column are generated automatically. This feature allows both R and Python APIs to behave the same and does not require from them additional dependencies to construct the binary buffers. Moreover in case the indexing for SOMAGeometryDataFrame changes in the future minor changes should be necessary to the R and Python APIs.

@XanthosXanthopoulos XanthosXanthopoulos force-pushed the xan/sc-52730/geometry-dataframe branch from e788ae2 to 60e22a3 Compare October 18, 2024 15:42
Copy link

codecov bot commented Oct 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.30%. Comparing base (58ca2d0) to head (60e22a3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3201      +/-   ##
==========================================
+ Coverage   83.19%   83.30%   +0.10%     
==========================================
  Files          51       51              
  Lines        5504     5504              
==========================================
+ Hits         4579     4585       +6     
+ Misses        925      919       -6     
Flag Coverage Δ
python 83.30% <ø> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
python_api 83.30% <ø> (+0.10%) ⬆️
libtiledbsoma ∅ <ø> (∅)

@johnkerl johnkerl changed the title [c++] Geometry dataframe [c++] Geometry Dataframe [draft] Nov 4, 2024
Comment on lines +6 to +26
* The MIT License
*
* @copyright Copyright (c) 2024 TileDB, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be replaced with the smaller C++ license header (see other files).

Comment on lines +4 to +26
* @section LICENSE
*
* The MIT License
*
* @copyright Copyright (c) 2024 TileDB, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be replaced with the smaller copyright header.

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

Successfully merging this pull request may close these issues.

2 participants