-
Notifications
You must be signed in to change notification settings - Fork 12
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
Adds basic geoparquet support #94
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #94 +/- ##
==========================================
+ Coverage 92.54% 92.65% +0.10%
==========================================
Files 75 75
Lines 9621 9813 +192
==========================================
+ Hits 8904 9092 +188
- Misses 717 721 +4 ☔ View full report in Codecov by Sentry. |
We already write postgis geometry column as WKB formatted binary, as specified by [geoparquet spec](https://geoparquet.org/releases/v1.0.0-rc.1/). With this PR, we also write basic geoparquet metadata. We support only basic info to be interoperable with duckdb.
010eb4b
to
fef4b55
Compare
src/type_compat/geometry.rs
Outdated
|
||
impl GeometryType { | ||
fn from_typmod(typmod: i32) -> Option<Self> { | ||
// taken from Postgis source code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could have taken it from wikipedia :)
https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry
(postgis source code is GPL, so this comment might raise some eyebrows, though it's obviously not copied)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
although I guess you're referring to the first line, maybe just "see postgis:"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does the reader need support as well?
Yep, when the attribute (in tupledesc) is geometry, we convert bytes to it. |
We already write postgis geometry column as WKB formatted binary, as specified by geoparquet spec.
With this PR, we also write basic geoparquet metadata to key value metadata of the parquet file. We support only basic info (required by the spec) to be interoperable with duckdb.