Skip to content

[Feature Request] DuckDB - Spatial / Ducklake Support #7353

Open

Activity

  1. msmitherdc commented on Sep 21, 2025

    @msmitherdc
    Contributor

    You actually can do this now via GDAL (OGR) ADBC connection.

    An example connection:

            connection "ADBC:/path/myfile.parquet"
            CONNECTIONOPTIONS
                "PRELUDE_STATEMENTS" "ADBC_DRIVER=/opt/conda/envs/default/lib/libduckdb.so"
                "PRELUDE_STATEMENTS" "load spatial" 
                "PRELUDE_STATEMENTS" "load httpfs" 
                "PRELUDE_STATEMENTS" "set memory_limit = '10MB'"
                "PRELUDE_STATEMENTS" "Set home_directory = '/path/'"
            END
    
  2. yharby commented on Sep 21, 2025

    @yharby
    Author

    Thanks @msmitherdc for the reply .. i am trying something like :

        CONNECTIONTYPE OGR
        CONNECTION "ADBC:"
        CONNECTIONOPTIONS
          "ADBC_DRIVER" "duckdb"
          "PRELUDE_STATEMENTS" "load spatial"
          "PRELUDE_STATEMENTS" "set memory_limit = '256MB'"
          "PRELUDE_STATEMENTS" "set home_directory = '.'"
          "sql" "SELECT geometry, name, iso_a3, continent, pop_est FROM './data/example.parquet'"

    and when i map2img -m ./maps/duckdb.map -o test_adbc_data.png i can see the map rendered correctly with different duckdb sql queries but when i go to ogcapi/collections/countries/items?f=html i got :

    {"code":"NotFound","description":"Collection items query failed."}
  3. yharby commented on Sep 22, 2025

    @yharby
    Author

    I’m working on creating an easy “getting started” setup for MapServer with Parquet that’s simple to install and cross-platform using Pixi (Conda-based). You can check the branch here:
    https://github.com/walkthru-lat/mapserver-parquet/tree/windows-support

    • macOS and Linux are working fine
    • Windows still has some issues that I’m troubleshooting

    I’m using the caddy-cgi plugin, since later I plan to add ?token= as a forward_auth capability in Caddy for authentication and authorization (LDAP integrations, etc.).

    For this issue specifically, you’ll find two Mapfiles:

    1. [geoparquet.map](https://github.com/walkthru-lat/mapserver-parquet/blob/windows-support/maps/geoparquet.map) → working
    2. [duckdb.map](https://github.com/walkthru-lat/mapserver-parquet/blob/windows-support/maps/duckdb.map) → not working
  4. jratike80 commented on Sep 22, 2025

    @jratike80

    The not-working mapfileseems to miss closing ' in "sql" "SELECT geometry, name, iso_a3, continent, pop_est FROM read_parquet('https://github.com/opengeospatial/geoparquet/raw/main/examples/example.parquet)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions