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

ENH: add to_wkb / from_wkb #68

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

jorisvandenbossche
Copy link
Collaborator

@jorisvandenbossche jorisvandenbossche commented Nov 10, 2024

Depends on paleolimbot/s2geography#42

Closes #38

@benbovy benbovy added this to the 0.1.0 milestone Nov 14, 2024
@jorisvandenbossche
Copy link
Collaborator Author

The upstream change is merged in s2georaphy, so this should be ready now

Copy link
Owner

@benbovy benbovy left a comment

Choose a reason for hiding this comment

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

Thanks @jorisvandenbossche! Two minor comments below.

docs/api.rst Outdated Show resolved Hide resolved
}

private:
std::shared_ptr<s2geog::WKBReader> m_reader;
Copy link
Owner

Choose a reason for hiding this comment

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

Use unique_ptr instead of shared_ptr? (Also in ToWKB) Unless I'm missing something?

Copy link
Collaborator Author

@jorisvandenbossche jorisvandenbossche Nov 17, 2024

Choose a reason for hiding this comment

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

It might be that pybind11 requires this class to be copyable? (if you pass it as argument to vectorize)
And that then gives the typical "use of deleted function" compilation errors if using unique_ptr instead of shared_ptr

Co-authored-by: Benoit Bovy <[email protected]>
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.

Add IO functions to read and write WKT and WKB
2 participants