From 0ab152f5fee241dfe0399a6cf6e91586ece01b46 Mon Sep 17 00:00:00 2001 From: Majid Date: Wed, 15 Apr 2026 00:28:03 -0500 Subject: [PATCH] fix: Remove outdated release step and add extension description file --- .../workflows/MainDistributionPipeline.yml | 30 -------- description.yml | 71 +++++++++++++++++++ 2 files changed, 71 insertions(+), 30 deletions(-) create mode 100644 description.yml diff --git a/.github/workflows/MainDistributionPipeline.yml b/.github/workflows/MainDistributionPipeline.yml index 2b9c2a8..08c0011 100644 --- a/.github/workflows/MainDistributionPipeline.yml +++ b/.github/workflows/MainDistributionPipeline.yml @@ -88,33 +88,3 @@ jobs: files: dist/*.duckdb_extension make_latest: true prerelease: false - - - name: Update latest pre-release - if: github.ref == 'refs/heads/main' - uses: softprops/action-gh-release@v2 - with: - tag_name: latest - name: "Latest build" - body: | - Automated build from the `main` branch against **DuckDB v1.5.1**. - - ## Download - - Pick the binary for your platform from the assets below, then load it in DuckDB: - - ```sql - -- start DuckDB with unsigned extensions allowed - -- CLI: duckdb -unsigned - LOAD '/path/to/duck_geoarrow-.duckdb_extension'; - ``` - - | Platform | File | - |----------|------| - | Linux x86-64 | `duck_geoarrow-linux_amd64.duckdb_extension` | - | Linux arm64 | `duck_geoarrow-linux_arm64.duckdb_extension` | - | macOS x86-64 | `duck_geoarrow-osx_amd64.duckdb_extension` | - | macOS arm64 | `duck_geoarrow-osx_arm64.duckdb_extension` | - | Windows x86-64| `duck_geoarrow-windows_amd64.duckdb_extension`| - files: dist/*.duckdb_extension - make_latest: false - prerelease: true diff --git a/description.yml b/description.yml new file mode 100644 index 0000000..8b1f7d6 --- /dev/null +++ b/description.yml @@ -0,0 +1,71 @@ +extension: + name: duck_geoarrow + description: DuckDB extension for converting GEOMETRY/WKB to and from GeoArrow native encodings, powered by geoarrow-c. Built against DuckDB v1.5.2. + version: 0.1.0 + language: C++ + build: cmake + license: MIT + maintainers: + - am2222 + +repo: + github: am2222/duck_geoarrow + ref: 3d0e6c597842753591633173826446b50f35b2b3 + +docs: + hello_world: | + INSTALL duck_geoarrow FROM community; + LOAD duck_geoarrow; + + -- Convert a WKB point to GeoArrow struct + SELECT st_asgeoarrow('\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF0\x3F\x00\x00\x00\x00\x00\x00\x00\x40'::BLOB); + -- → {geometry_type: 1, xs: [1.0], ys: [2.0], ring_offsets: [], geom_offsets: []} + + -- With the spatial extension loaded, use GEOMETRY directly + LOAD spatial; + SELECT st_asgeoarrow(ST_Point(1.0, 2.0)::GEOMETRY); + + -- Convert back: GeoArrow struct → GEOMETRY (WKB) + SELECT st_geomfromgeoarrow(st_asgeoarrow(ST_Point(30, 10)::GEOMETRY)); + + -- Native-typed point extraction (returns STRUCT) + SELECT st_asgeoarrowpoint(ST_Point(30, 10)::GEOMETRY); + -- → {x: 30.0, y: 10.0} + + -- Native-typed linestring (returns List>) + SELECT st_asgeoarrowlinestring(ST_GeomFromText('LINESTRING(0 0, 1 1, 2 2)')::GEOMETRY); + + -- Native-typed polygon (returns List>>) + SELECT st_asgeoarrowpolygon(ST_GeomFromText('POLYGON((0 0, 4 0, 4 4, 0 4, 0 0))')::GEOMETRY); + + -- Version info + SELECT duck_geoarrow_version(); + + extended_description: | + `duck_geoarrow` converts between DuckDB's WKB-based `GEOMETRY`/`BLOB` type and + [GeoArrow](https://geoarrow.org) native struct encodings, powered by + [geoarrow-c](https://github.com/geoarrow/geoarrow-c). + + **Generic conversion functions** (accept `GEOMETRY` or `BLOB` containing WKB): + + - `st_asgeoarrow(geom)` — WKB → GeoArrow struct with geometry_type, xs, ys, ring_offsets, geom_offsets + - `st_geomfromgeoarrow(struct)` — GeoArrow struct → WKB `GEOMETRY` + + **Native-typed functions** (return Arrow-native nested types for direct columnar use): + + | Function | Arrow type | + |---|---| + | `st_asgeoarrowpoint` | `Struct` | + | `st_asgeoarrowlinestring` | `List>` | + | `st_asgeoarrowpolygon` | `List>>` | + | `st_asgeoarrowmultipoint` | `List>` | + | `st_asgeoarrowmultilinestring` | `List>>` | + | `st_asgeoarrowmultipolygon` | `List>>>` | + + **Utility:** + + - `duck_geoarrow_version()` — returns extension and geoarrow-c version info + + All functions accept both `GEOMETRY` (from the spatial extension) and raw `BLOB` + containing valid WKB. The native-typed functions validate that the input geometry + matches the expected type and raise an error on mismatch.