Skip navigation
The 1.4 release of DuckDB supports using a DuckDB database to serve vector tiles!
0:00 / 0:31

The 1.4 release of DuckDB supports using a DuckDB database to serve vector tiles!

Kyle Walker

@kyle_e_walker21K followers

Visit on X
504 likesDownloadOriginal post

45,635 views

The 1.4 release of DuckDB supports using a DuckDB database to serve vector tiles! Of course, I had to try this out in R. Check it out: all 242,000 US Census block groups dynamically served as vector tiles from a DuckDB database, displayed on a MapLibre map from R in Positron.

11 Comments

Comments from the original post on X (Twitter)

  • Kyle Walker's profile picture

    @kyle_e_walker

    Here's the script if you want to try it out yourselves: It took some back-and-forth with Claude Sonnet, but with @giswqs's code as a huge help, it works great. I can see tons of potential applications for this - and maybe a home in mapgl in the future!

    26 likes

  • Karan Jagtiani's profile picture

    @karanjagtiani04

    @duckdb Nice work on the vector tiles! This could really enhance geospatial visualizations. Curious how performance holds up with that many block groups.

    1 like

  • Arthur Gailes's profile picture

    @ArthurGailes

    @duckdb Just the tileserver would be a neat package.

    1 like

  • Kyle Walker's profile picture

    @kyle_e_walker

    @duckdb yeah, maybe a PR into the duckspatial package?

    3 likes

  • Arthur Gailes's profile picture

    @ArthurGailes

    @duckdb Yes, I'll look into it. Could be nice by itself as well to interface with Postgres. Have you tried this with out of memory data? Part of the tile benefit is larger than memory data.

    1 like

  • Kyle Walker's profile picture

    @kyle_e_walker

    @duckdb I haven't - what you see is my only attempt at it

    2 likes

  • Arthur Gailes's profile picture

    @ArthurGailes

    @duckdb FYI I made a package for the server functionality. Thanks for the demo, this works beautifully.

    1 like

  • Kyle Walker's profile picture

    @kyle_e_walker

    @duckdb the best of social media right here! conversations sparking new ideas!

    1 like

  • Bernat Fortet Unanue's profile picture

    @bernatfortet

    @duckdb How does it compare to postgis serving tiles?

  • Kyle Walker's profile picture

    @kyle_e_walker

    @duckdb I have not benchmarked them, but I'd be curious!

  • Team Reagent's profile picture

    @Reagent_Systems

    @duckdb This is why I love X. I get to see something absolutely fascinating that I know nothing about and yet, I can instantly find out all I want to know about it. This is cool! A new DB!