@@ -51,6 +51,7 @@ def convert_pbf_to_duckdb(
51
51
ignore_cache : bool = False ,
52
52
filter_osm_ids : Optional [list [str ]] = None ,
53
53
custom_sql_filter : Optional [str ] = None ,
54
+ filter_logical_operator : str = "OR" ,
54
55
duckdb_table_name : str = "quackosm" ,
55
56
working_directory : Union [str , Path ] = "files" ,
56
57
osm_way_polygon_features_config : Optional [Union [OsmWayPolygonConfig , dict [str , Any ]]] = None ,
@@ -108,6 +109,10 @@ def convert_pbf_to_duckdb(
108
109
custom_sql_filter (str, optional): Allows users to pass custom SQL conditions used
109
110
to filter OSM features. It will be embedded into predefined queries and requires
110
111
DuckDB syntax to operate on tags map object. Defaults to None.
112
+ filter_logical_operator (str, optional): Logical operator used to join positive tag filter
113
+ conditions. Either "OR" (default) or "AND". With "OR", objects matching any
114
+ of the tag conditions are included. With "AND", objects must match all tag
115
+ conditions. Defaults to "OR".
111
116
duckdb_table_name (str): Table in which to store the OSM data inside the DuckDB database.
112
117
working_directory (Union[str, Path], optional): Directory where to save
113
118
the parsed `*.parquet` files. Defaults to "files".
@@ -269,6 +274,7 @@ def convert_pbf_to_duckdb(
269
274
tags_filter = tags_filter ,
270
275
geometry_filter = geometry_filter ,
271
276
custom_sql_filter = custom_sql_filter ,
277
+ filter_logical_operator = filter_logical_operator ,
272
278
working_directory = working_directory ,
273
279
osm_way_polygon_features_config = osm_way_polygon_features_config ,
274
280
compression = compression ,
@@ -306,6 +312,7 @@ def convert_geometry_to_duckdb(
306
312
ignore_cache : bool = False ,
307
313
filter_osm_ids : Optional [list [str ]] = None ,
308
314
custom_sql_filter : Optional [str ] = None ,
315
+ filter_logical_operator : str = "OR" ,
309
316
duckdb_table_name : str = "quackosm" ,
310
317
working_directory : Union [str , Path ] = "files" ,
311
318
osm_way_polygon_features_config : Optional [Union [OsmWayPolygonConfig , dict [str , Any ]]] = None ,
@@ -368,6 +375,10 @@ def convert_geometry_to_duckdb(
368
375
custom_sql_filter (str, optional): Allows users to pass custom SQL conditions used
369
376
to filter OSM features. It will be embedded into predefined queries and requires
370
377
DuckDB syntax to operate on tags map object. Defaults to None.
378
+ filter_logical_operator (str, optional): Logical operator used to join positive tag filter
379
+ conditions. Either "OR" (default) or "AND". With "OR", objects matching any
380
+ of the tag conditions are included. With "AND", objects must match all tag
381
+ conditions. Defaults to "OR".
371
382
duckdb_table_name (str): Table in which to store the OSM data inside the DuckDB database.
372
383
working_directory (Union[str, Path], optional): Directory where to save
373
384
the parsed `*.parquet` files. Defaults to "files".
@@ -492,6 +503,7 @@ def convert_geometry_to_duckdb(
492
503
tags_filter = tags_filter ,
493
504
geometry_filter = geometry_filter ,
494
505
custom_sql_filter = custom_sql_filter ,
506
+ filter_logical_operator = filter_logical_operator ,
495
507
working_directory = working_directory ,
496
508
osm_way_polygon_features_config = osm_way_polygon_features_config ,
497
509
compression = compression ,
@@ -532,6 +544,7 @@ def convert_osm_extract_to_duckdb(
532
544
ignore_cache : bool = False ,
533
545
filter_osm_ids : Optional [list [str ]] = None ,
534
546
custom_sql_filter : Optional [str ] = None ,
547
+ filter_logical_operator : str = "OR" ,
535
548
duckdb_table_name : str = "quackosm" ,
536
549
working_directory : Union [str , Path ] = "files" ,
537
550
osm_way_polygon_features_config : Optional [Union [OsmWayPolygonConfig , dict [str , Any ]]] = None ,
@@ -592,6 +605,10 @@ def convert_osm_extract_to_duckdb(
592
605
custom_sql_filter (str, optional): Allows users to pass custom SQL conditions used
593
606
to filter OSM features. It will be embedded into predefined queries and requires
594
607
DuckDB syntax to operate on tags map object. Defaults to None.
608
+ filter_logical_operator (str, optional): Logical operator used to join positive tag filter
609
+ conditions. Either "OR" (default) or "AND". With "OR", objects matching any
610
+ of the tag conditions are included. With "AND", objects must match all tag
611
+ conditions. Defaults to "OR".
595
612
duckdb_table_name (str): Table in which to store the OSM data inside the DuckDB database.
596
613
working_directory (Union[str, Path], optional): Directory where to save
597
614
the parsed `*.parquet` files. Defaults to "files".
@@ -672,6 +689,7 @@ def convert_osm_extract_to_duckdb(
672
689
tags_filter = tags_filter ,
673
690
geometry_filter = geometry_filter ,
674
691
custom_sql_filter = custom_sql_filter ,
692
+ filter_logical_operator = filter_logical_operator ,
675
693
working_directory = working_directory ,
676
694
osm_way_polygon_features_config = osm_way_polygon_features_config ,
677
695
compression = compression ,
@@ -709,6 +727,7 @@ def convert_pbf_to_parquet(
709
727
ignore_cache : bool = False ,
710
728
filter_osm_ids : Optional [list [str ]] = None ,
711
729
custom_sql_filter : Optional [str ] = None ,
730
+ filter_logical_operator : str = "OR" ,
712
731
working_directory : Union [str , Path ] = "files" ,
713
732
osm_way_polygon_features_config : Optional [Union [OsmWayPolygonConfig , dict [str , Any ]]] = None ,
714
733
save_as_wkt : bool = False ,
@@ -766,6 +785,10 @@ def convert_pbf_to_parquet(
766
785
custom_sql_filter (str, optional): Allows users to pass custom SQL conditions used
767
786
to filter OSM features. It will be embedded into predefined queries and requires
768
787
DuckDB syntax to operate on tags map object. Defaults to None.
788
+ filter_logical_operator (str, optional): Logical operator used to join positive tag filter
789
+ conditions. Either "OR" (default) or "AND". With "OR", objects matching any
790
+ of the tag conditions are included. With "AND", objects must match all tag
791
+ conditions. Defaults to "OR".
769
792
working_directory (Union[str, Path], optional): Directory where to save
770
793
the parsed `*.parquet` files. Defaults to "files".
771
794
osm_way_polygon_features_config (Union[OsmWayPolygonConfig, dict[str, Any]], optional):
@@ -927,6 +950,7 @@ def convert_pbf_to_parquet(
927
950
tags_filter = tags_filter ,
928
951
geometry_filter = geometry_filter ,
929
952
custom_sql_filter = custom_sql_filter ,
953
+ filter_logical_operator = filter_logical_operator ,
930
954
working_directory = working_directory ,
931
955
osm_way_polygon_features_config = osm_way_polygon_features_config ,
932
956
compression = compression ,
@@ -964,6 +988,7 @@ def convert_geometry_to_parquet(
964
988
ignore_cache : bool = False ,
965
989
filter_osm_ids : Optional [list [str ]] = None ,
966
990
custom_sql_filter : Optional [str ] = None ,
991
+ filter_logical_operator : str = "OR" ,
967
992
working_directory : Union [str , Path ] = "files" ,
968
993
osm_way_polygon_features_config : Optional [Union [OsmWayPolygonConfig , dict [str , Any ]]] = None ,
969
994
save_as_wkt : bool = False ,
@@ -1026,6 +1051,10 @@ def convert_geometry_to_parquet(
1026
1051
custom_sql_filter (str, optional): Allows users to pass custom SQL conditions used
1027
1052
to filter OSM features. It will be embedded into predefined queries and requires
1028
1053
DuckDB syntax to operate on tags map object. Defaults to None.
1054
+ filter_logical_operator (str, optional): Logical operator used to join positive tag filter
1055
+ conditions. Either "OR" (default) or "AND". With "OR", objects matching any
1056
+ of the tag conditions are included. With "AND", objects must match all tag
1057
+ conditions. Defaults to "OR".
1029
1058
working_directory (Union[str, Path], optional): Directory where to save
1030
1059
the parsed `*.parquet` files. Defaults to "files".
1031
1060
osm_way_polygon_features_config (Union[OsmWayPolygonConfig, dict[str, Any]], optional):
@@ -1149,6 +1178,7 @@ def convert_geometry_to_parquet(
1149
1178
tags_filter = tags_filter ,
1150
1179
geometry_filter = geometry_filter ,
1151
1180
custom_sql_filter = custom_sql_filter ,
1181
+ filter_logical_operator = filter_logical_operator ,
1152
1182
working_directory = working_directory ,
1153
1183
osm_way_polygon_features_config = osm_way_polygon_features_config ,
1154
1184
compression = compression ,
@@ -1189,6 +1219,7 @@ def convert_osm_extract_to_parquet(
1189
1219
ignore_cache : bool = False ,
1190
1220
filter_osm_ids : Optional [list [str ]] = None ,
1191
1221
custom_sql_filter : Optional [str ] = None ,
1222
+ filter_logical_operator : str = "OR" ,
1192
1223
working_directory : Union [str , Path ] = "files" ,
1193
1224
osm_way_polygon_features_config : Optional [Union [OsmWayPolygonConfig , dict [str , Any ]]] = None ,
1194
1225
save_as_wkt : bool = False ,
@@ -1249,6 +1280,10 @@ def convert_osm_extract_to_parquet(
1249
1280
custom_sql_filter (str, optional): Allows users to pass custom SQL conditions used
1250
1281
to filter OSM features. It will be embedded into predefined queries and requires
1251
1282
DuckDB syntax to operate on tags map object. Defaults to None.
1283
+ filter_logical_operator (str, optional): Logical operator used to join positive tag filter
1284
+ conditions. Either "OR" (default) or "AND". With "OR", objects matching any
1285
+ of the tag conditions are included. With "AND", objects must match all tag
1286
+ conditions. Defaults to "OR".
1252
1287
working_directory (Union[str, Path], optional): Directory where to save
1253
1288
the parsed `*.parquet` files. Defaults to "files".
1254
1289
osm_way_polygon_features_config (Union[OsmWayPolygonConfig, dict[str, Any]], optional):
@@ -1330,6 +1365,7 @@ def convert_osm_extract_to_parquet(
1330
1365
tags_filter = tags_filter ,
1331
1366
geometry_filter = geometry_filter ,
1332
1367
custom_sql_filter = custom_sql_filter ,
1368
+ filter_logical_operator = filter_logical_operator ,
1333
1369
working_directory = working_directory ,
1334
1370
osm_way_polygon_features_config = osm_way_polygon_features_config ,
1335
1371
compression = compression ,
@@ -1367,6 +1403,7 @@ def convert_pbf_to_geodataframe(
1367
1403
ignore_cache : bool = False ,
1368
1404
filter_osm_ids : Optional [list [str ]] = None ,
1369
1405
custom_sql_filter : Optional [str ] = None ,
1406
+ filter_logical_operator : str = "OR" ,
1370
1407
working_directory : Union [str , Path ] = "files" ,
1371
1408
osm_way_polygon_features_config : Optional [Union [OsmWayPolygonConfig , dict [str , Any ]]] = None ,
1372
1409
verbosity_mode : VERBOSITY_MODE = "transient" ,
@@ -1423,6 +1460,10 @@ def convert_pbf_to_geodataframe(
1423
1460
custom_sql_filter (str, optional): Allows users to pass custom SQL conditions used
1424
1461
to filter OSM features. It will be embedded into predefined queries and requires
1425
1462
DuckDB syntax to operate on tags map object. Defaults to None.
1463
+ filter_logical_operator (str, optional): Logical operator used to join positive tag filter
1464
+ conditions. Either "OR" (default) or "AND". With "OR", objects matching any
1465
+ of the tag conditions are included. With "AND", objects must match all tag
1466
+ conditions. Defaults to "OR".
1426
1467
working_directory (Union[str, Path], optional): Directory where to save
1427
1468
the parsed `*.parquet` files. Defaults to "files".
1428
1469
osm_way_polygon_features_config (Union[OsmWayPolygonConfig, dict[str, Any]], optional):
@@ -1558,6 +1599,7 @@ def convert_pbf_to_geodataframe(
1558
1599
tags_filter = tags_filter ,
1559
1600
geometry_filter = geometry_filter ,
1560
1601
custom_sql_filter = custom_sql_filter ,
1602
+ filter_logical_operator = filter_logical_operator ,
1561
1603
working_directory = working_directory ,
1562
1604
osm_way_polygon_features_config = osm_way_polygon_features_config ,
1563
1605
compression = compression ,
@@ -1591,6 +1633,7 @@ def convert_geometry_to_geodataframe(
1591
1633
ignore_cache : bool = False ,
1592
1634
filter_osm_ids : Optional [list [str ]] = None ,
1593
1635
custom_sql_filter : Optional [str ] = None ,
1636
+ filter_logical_operator : str = "OR" ,
1594
1637
working_directory : Union [str , Path ] = "files" ,
1595
1638
osm_way_polygon_features_config : Optional [Union [OsmWayPolygonConfig , dict [str , Any ]]] = None ,
1596
1639
verbosity_mode : VERBOSITY_MODE = "transient" ,
@@ -1649,6 +1692,10 @@ def convert_geometry_to_geodataframe(
1649
1692
custom_sql_filter (str, optional): Allows users to pass custom SQL conditions used
1650
1693
to filter OSM features. It will be embedded into predefined queries and requires
1651
1694
DuckDB syntax to operate on tags map object. Defaults to None.
1695
+ filter_logical_operator (str, optional): Logical operator used to join positive tag filter
1696
+ conditions. Either "OR" (default) or "AND". With "OR", objects matching any
1697
+ of the tag conditions are included. With "AND", objects must match all tag
1698
+ conditions. Defaults to "OR".
1652
1699
working_directory (Union[str, Path], optional): Directory where to save
1653
1700
the parsed `*.parquet` files. Defaults to "files".
1654
1701
osm_way_polygon_features_config (Union[OsmWayPolygonConfig, dict[str, Any]], optional):
@@ -1729,6 +1776,7 @@ def convert_geometry_to_geodataframe(
1729
1776
tags_filter = tags_filter ,
1730
1777
geometry_filter = geometry_filter ,
1731
1778
custom_sql_filter = custom_sql_filter ,
1779
+ filter_logical_operator = filter_logical_operator ,
1732
1780
working_directory = working_directory ,
1733
1781
osm_way_polygon_features_config = osm_way_polygon_features_config ,
1734
1782
compression = compression ,
@@ -1765,6 +1813,7 @@ def convert_osm_extract_to_geodataframe(
1765
1813
ignore_cache : bool = False ,
1766
1814
filter_osm_ids : Optional [list [str ]] = None ,
1767
1815
custom_sql_filter : Optional [str ] = None ,
1816
+ filter_logical_operator : str = "OR" ,
1768
1817
working_directory : Union [str , Path ] = "files" ,
1769
1818
osm_way_polygon_features_config : Optional [Union [OsmWayPolygonConfig , dict [str , Any ]]] = None ,
1770
1819
verbosity_mode : VERBOSITY_MODE = "transient" ,
@@ -1821,6 +1870,10 @@ def convert_osm_extract_to_geodataframe(
1821
1870
custom_sql_filter (str, optional): Allows users to pass custom SQL conditions used
1822
1871
to filter OSM features. It will be embedded into predefined queries and requires
1823
1872
DuckDB syntax to operate on tags map object. Defaults to None.
1873
+ filter_logical_operator (str, optional): Logical operator used to join positive tag filter
1874
+ conditions. Either "OR" (default) or "AND". With "OR", objects matching any
1875
+ of the tag conditions are included. With "AND", objects must match all tag
1876
+ conditions. Defaults to "OR".
1824
1877
working_directory (Union[str, Path], optional): Directory where to save
1825
1878
the parsed `*.parquet` files. Defaults to "files".
1826
1879
osm_way_polygon_features_config (Union[OsmWayPolygonConfig, dict[str, Any]], optional):
@@ -1892,6 +1945,7 @@ def convert_osm_extract_to_geodataframe(
1892
1945
tags_filter = tags_filter ,
1893
1946
geometry_filter = geometry_filter ,
1894
1947
custom_sql_filter = custom_sql_filter ,
1948
+ filter_logical_operator = filter_logical_operator ,
1895
1949
working_directory = working_directory ,
1896
1950
osm_way_polygon_features_config = osm_way_polygon_features_config ,
1897
1951
compression = compression ,
0 commit comments