Skip to content

Conversation

@kimakan
Copy link
Contributor

@kimakan kimakan commented Jun 2, 2025

This PR allows to select a region using the 'Box' or 'Lasso' tool in the scatter plot and then submit a query for the selected region. This feature is only working for a postgres database since it's using the postgres native functions/types polygon and point.
Basically, we construct a query out of the selection points

SELECT *
FROM "user_schema"."user_table" as t
WHERE POLYGON '("POLYGON POINTS")' @> POINT(t.selectedX, t.selectedY});

The features requires python3-queryparser >= 0.7.3 , see aipescience/queryparser#24

Note: The selection work purely on a flat surface using Cartesian coordinates.

image

@kimakan kimakan marked this pull request as ready for review June 2, 2025 14:05
@kimakan kimakan merged commit 42fbc58 into dev Jun 4, 2025
10 checks passed
@kimakan kimakan deleted the select-plot branch June 4, 2025 08:20
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.

2 participants