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

Support joins from sqlite tables in tile-join #308

Open
wants to merge 32 commits into
base: main
Choose a base branch
from
Open

Conversation

e-n-f
Copy link
Collaborator

@e-n-f e-n-f commented Dec 6, 2024

This PR adds options to tile-join to join attributes from a sqlite3 database onto existing tiled geometries. The new options are:

  • --join-sqlite file.db
  • --join-tile-attribute attribute: the name of the attribute in the tiled features that is used for the join key
  • --join-table-expression expression: the sql expression that is matched in the database table: for example lower(country) to match lowercase country names in the tiles against mixed-case country names in the database by smashing their case
  • --join-table table: the name of the table to be matched against in the database
  • --join-count-limit limit: the maximum number of rows from the database (default 1) that will be joined to copies of the feature in the tiles
  • --use-attribute-for-id attribute: use the named attribute from the sql row as the feature ID, instead of the feature ID from the tiled feature that it is joined to.

It also improves tile-joins bounding box output so that the bounding box reflects the bounds of all copied features at all zoom levels rather than only the bounding box of the tiles from which any features were copied at maxzoom. (The zoom-neutrality is necessary to play nicely with --generate-variable-depth-tile-pyramid.)

e-n-f added 30 commits November 4, 2024 12:17
@e-n-f e-n-f marked this pull request as ready for review January 10, 2025 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant