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

wip coord buffer trait #139

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

wip coord buffer trait #139

wants to merge 1 commit into from

Conversation

kylebarron
Copy link
Member

@kylebarron kylebarron commented Aug 9, 2023

This is hard!

In particular I hit that there are multiple traits needed potentially:

  • Coord: this would be similar to the arrow2 Offset trait, and would be simple, describing whether it's XY, XYZ, etc. Maybe this would also have some knowledge of whether it's interleaved/separated, but that's uncertain.
  • CoordBuffer: I started with this, until I realized that I'd also need a mutable version of this. And we'd need some interaction between CoordBuffer and some MutableCoordBuffer trait. Not sure exactly how that would work.

In contrast to Offset, which is used as a generic in both OffsetsBuffer<O> and the mutable Offsets<O>, there are multiple ways to store the coords for the coord buffer. In particular, separated and interleaved coords aren't just generic over a single type, but their internal storage is different too. So you'd really need a generic for the coord buffer, and maybe another for the coord?

Closes #127

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.

Coordinate/Coordinate Array trait to support XYZM
1 participant