diff --git a/src/query_builder/builder.py b/src/query_builder/builder.py index e6f4d830..56f3e367 100644 --- a/src/query_builder/builder.py +++ b/src/query_builder/builder.py @@ -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)