planetlabs / gpq

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

Fix issue converting Parquet with WKT geometry #35

Closed tschaub closed 1 year ago

tschaub commented 1 year ago

Previously, when converting an input Parquet file to a GeoParquet file, the same metadata struct would be used to read the input metadata and write the output metadata. When the input geometry type is WKT, the output is converted to WKB. During writing, the metadata was modified after writing the first geometry. This meant that reading the second geometry failed since it was not WKB (but the modified metadata indicated that it was).

This change ensures that the input metadata is cloned before creating modified output metadata.

Fixes #34.