Skip to content

Commit

Permalink
Defaults to st_intersects for now in duckdb query
Browse files Browse the repository at this point in the history
  • Loading branch information
kshitijrajsharma committed Jan 12, 2024
1 parent c345d62 commit 1908f0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/query_builder/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ def extract_features_duckdb(base_table_name, select, feature_type, where, geomet
for table in from_query:
where_query = map_tables[feature_type]["where"][table]
if geometry:
where_query += f" and (ST_Intersects_Extent(geometry,ST_GeomFromGeoJSON('{geometry.json()}')))"
where_query += f" and (ST_Intersects(geometry,ST_GeomFromGeoJSON('{geometry.json()}')))"
query = f"""select {select_query} from {f"{base_table_name}_{table}"} where {where_query}"""
base_query.append(query)
return " UNION ALL ".join(base_query)
Expand Down

0 comments on commit 1908f0c

Please sign in to comment.