duckdb / duckdb_spatial

MIT License
492 stars 41 forks source link

Demo of dynamic/configurable/optionally remote proj.db file #422

Closed carlopi closed 1 month ago

carlopi commented 1 month ago

Demo of projection database served over duckdbvfs barebone implementation.

To try this out:

  1. Generate proj.db
#include <stdio.h>
#include "spatial/src/spatial/proj/proj_db.c"

int main(void)
{
    for (unsigned int i = 0; i < proj_db_len; i++)
        putchar(proj_db[i]);
    return 0;
}

g++ file.cpp -o generate_proj && ./generate_proj > proj.db (should this part of the Makefile? Or it's already there?)

  1. Launch http-server from the same folder where proj.db is

  2. python3 duckdb/scripts/run_tests_one_by_one.py ./build/release/test/unittest '/Users/carlo/duckdblabs/duckdb_spatial/test/sql/*

TODO:

carlopi commented 1 month ago

This is still very immature, just a demo, I opened this by mistake, wanted to have it up on my fork. Moved over at https://github.com/carlopi/duckdb_spatial/pull/4 to discuss this.