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

Add IO functions to read and write WKT and WKB #38

Open
jorisvandenbossche opened this issue Aug 19, 2024 · 1 comment
Open

Add IO functions to read and write WKT and WKB #38

jorisvandenbossche opened this issue Aug 19, 2024 · 1 comment

Comments

@jorisvandenbossche
Copy link
Collaborator

We should have functions to create geographies from WKT and WKB, and also to convert to WKT and WKB.

(similarly to shapely's from_wkt/from_wkb and to_wkt/to_wkb)

At the moment s2geography does have a basic WKTWriter (which we already use in __repr__) and WKTReader, but proper (and easier) support probably depends on paleolimbot/s2geography#16

@benbovy
Copy link
Owner

benbovy commented Aug 21, 2024

Some naive questions as I'm not very familiar yet with (geo)arrow.

IIUC paleolimbot/s2geography#16 adds support for Arrow arrays so that we can easily reuse all the work done in geoarrow (and its implementation geoarrow-c) for parsing / encoding simple feature geometries.

  • We want to support Numpy arrays for IO functions. So I guess we would need to internally convert Numpy <-> Arrow arrays to support that? How expensive would it be?
  • Do we want direct support for Arrow arrays in Spherely IO functions? This could be useful I guess, even though other vectorized "universal" functions in Spherely would still support Numpy arrays only. Or maybe it would make sense to support Arrow arrays everywhere and internally convert to Numpy arrays when needed?
  • Should we reuse geoarrow as well for coordinate operations (i.e., get_coordinates) to avoid reinventing the wheel, or would Add get_x and get_y vectorized functions (Point-only) #37 be straightforward to extent to other geometries?

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

No branches or pull requests

2 participants