planetlabs / gpq

Utility for working with GeoParquet
https://planetlabs.github.io/gpq/
Apache License 2.0
144 stars 8 forks source link

Support WKT encoding and use column type when encoding is unknown #16

Closed tschaub closed 1 year ago

tschaub commented 1 year ago

This adds support for WKT encoded geometries.

Although the spec doesn't currently allow it, if "encoding": "WKT" metadata is included for a geometry column, the data will be read as WKT.

In addition, if no encoding metadata property is found for a geometry column, the encoding will be derived from the column type. For columns annotated with the string logical type, WKT will be assumed. For other byte arrays (with no string annotation), WKB will be assumed.