Skip to content
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

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

Closed
wants to merge 3 commits into from

Conversation

carlopi
Copy link
Contributor

@carlopi carlopi commented Oct 3, 2024

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:

  • Sort out context cleanup (see failure in unittester)
  • Make location configurable via DuckDB option (should there be a MAP[extension_name] -> (MAP[option_name] -> option_value) to store extension options needed at load time ?
  • Figure out whether proj.db should be fetched on load or anyhow proper strategy. Or maybe native have it backed in (who cares) but optionally configurable, and Wasm has it always remote

@carlopi
Copy link
Contributor Author

carlopi commented Oct 3, 2024

This is still very immature, just a demo, I opened this by mistake, wanted to have it up on my fork. Moved over at carlopi#4 to discuss this.

@carlopi carlopi closed this Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant