benbovy / spherely

Manipulation and analysis of geometric objects on the sphere.
https://spherely.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
119 stars 8 forks source link

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

Open jorisvandenbossche opened 3 months ago

jorisvandenbossche commented 3 months ago

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 https://github.com/paleolimbot/s2geography/pull/16

benbovy commented 3 months ago

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

IIUC https://github.com/paleolimbot/s2geography/pull/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.