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

support the actual binary representation of wkb #1

Closed
lovasoa opened this issue Feb 13, 2020 · 1 comment · Fixed by #4
Closed

support the actual binary representation of wkb #1

lovasoa opened this issue Feb 13, 2020 · 1 comment · Fixed by #4

Comments

@lovasoa
Copy link
Contributor

lovasoa commented Feb 13, 2020

Thank you for this useful library.

Currently, in order to get the actual wkb representation of an object, one has to do:

bytes.fromhex(geo.wkb)

It would be both more efficient and more intuitive if geo.wkb contained directly the Well-Known Binary representation of the geometry. The string representation of the wkb could still be obtained with :

geo.wkb.hex()

What do you think about this change ? Would you be opened to a pull request ?

@bosth
Copy link
Owner

bosth commented Feb 14, 2020

Hi, I'm open to a PR. Just be aware that __str__ has to return a string so that PL/Python correctly converts to a PostGIS geometry type.

lovasoa added a commit to lovasoa/plpygis that referenced this issue Feb 18, 2020
Fixes bosth#1

WIP: python3-only
@lovasoa lovasoa mentioned this issue Feb 18, 2020
@bosth bosth closed this as completed in #4 Feb 21, 2020
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 a pull request may close this issue.

2 participants