|
29 | 29 | "convert_osm_extract_to_geodataframe",
|
30 | 30 | ]
|
31 | 31 |
|
| 32 | + |
32 | 33 | def convert_pbf_to_duckdb(
|
33 | 34 | pbf_path: Union[str, Path, Iterable[Union[str, Path]]],
|
34 | 35 | tags_filter: Optional[Union[OsmTagsFilter, GroupedOsmTagsFilter]] = None,
|
@@ -154,7 +155,7 @@ def convert_pbf_to_duckdb(
|
154 | 155 | ... monaco_pbf_path, tags_filter={"building": True, "amenity": True, "highway": True}
|
155 | 156 | ... ) # doctest: +IGNORE_RESULT
|
156 | 157 | >>> ddb_path.as_posix()
|
157 |
| - 'files/monaco_6593ca69098459d039054bc5fe0a87c56681e29a5f59d38ce3485c03cb0e9374_noclip_compact.duckdb' |
| 158 | + 'files/monaco_6593ca69_noclip_compact.duckdb' |
158 | 159 |
|
159 | 160 | Get features for Malé - the capital city of Maldives
|
160 | 161 |
|
@@ -204,7 +205,7 @@ def convert_pbf_to_duckdb(
|
204 | 205 | ... )
|
205 | 206 | ... ) # doctest: +IGNORE_RESULT
|
206 | 207 | >>> ddb_path.as_posix()
|
207 |
| - 'files/maldives_nofilter_4eeabb20ccd8aefeaa80b9a46a202ab985fd454760823b7012cc7778498a085b_compact.duckdb' |
| 208 | + 'files/maldives_nofilter_4eeabb20_compact.duckdb' |
208 | 209 |
|
209 | 210 | >>> with duckdb.connect(str(ddb_path)) as con:
|
210 | 211 | ... con.load_extension('spatial')
|
@@ -259,6 +260,7 @@ def convert_pbf_to_duckdb(
|
259 | 260 | duckdb_table_name=duckdb_table_name,
|
260 | 261 | )
|
261 | 262 |
|
| 263 | + |
262 | 264 | def convert_geometry_to_duckdb(
|
263 | 265 | geometry_filter: BaseGeometry = None,
|
264 | 266 | osm_extract_source: Union[OsmExtractSource, str] = OsmExtractSource.any,
|
@@ -356,7 +358,7 @@ def convert_geometry_to_duckdb(
|
356 | 358 | ... )
|
357 | 359 | >>> ddb_path = qosm.convert_geometry_to_duckdb(from_wkt(wkt)) # doctest: +IGNORE_RESULT
|
358 | 360 | >>> ddb_path.as_posix()
|
359 |
| - 'files/bf4b33debfd6d3e605555340606df6ce7eea934958c1f3477aca0ccf79e7929f_nofilter_compact.duckdb' |
| 361 | + 'files/bf4b33de_nofilter_compact.duckdb' |
360 | 362 |
|
361 | 363 | Inspect the file with duckdb
|
362 | 364 | >>> import duckdb
|
@@ -401,7 +403,7 @@ def convert_geometry_to_duckdb(
|
401 | 403 | ... osm_extract_source='Geofabrik',
|
402 | 404 | ... ) # doctest: +IGNORE_RESULT
|
403 | 405 | >>> ddb_path.as_posix()
|
404 |
| - 'files/bf4b33debfd6d3e605555340606df6ce7eea934958c1f3477aca0ccf79e7929f_nofilter_compact.duckdb' |
| 406 | + 'files/bf4b33de_nofilter_compact.duckdb' |
405 | 407 |
|
406 | 408 | Inspect the file with duckdb
|
407 | 409 | >>> with duckdb.connect(str(ddb_path)) as con:
|
@@ -459,6 +461,7 @@ def convert_geometry_to_duckdb(
|
459 | 461 | duckdb_table_name=duckdb_table_name,
|
460 | 462 | )
|
461 | 463 |
|
| 464 | + |
462 | 465 | def convert_osm_extract_to_duckdb(
|
463 | 466 | osm_extract_query: str,
|
464 | 467 | osm_extract_source: Union[OsmExtractSource, str] = OsmExtractSource.any,
|
@@ -612,6 +615,7 @@ def convert_osm_extract_to_duckdb(
|
612 | 615 | duckdb_table_name=duckdb_table_name,
|
613 | 616 | )
|
614 | 617 |
|
| 618 | + |
615 | 619 | def convert_pbf_to_parquet(
|
616 | 620 | pbf_path: Union[str, Path, Iterable[Union[str, Path]]],
|
617 | 621 | tags_filter: Optional[Union[OsmTagsFilter, GroupedOsmTagsFilter]] = None,
|
@@ -739,7 +743,7 @@ def convert_pbf_to_parquet(
|
739 | 743 | ... tags_filter={"building": True, "amenity": True, "highway": True}
|
740 | 744 | ... ) # doctest: +IGNORE_RESULT
|
741 | 745 | >>> gpq_path.as_posix()
|
742 |
| - 'files/monaco_6593ca69098459d039054bc5fe0a87c56681e29a5f59d38ce3485c03cb0e9374_noclip_exploded.parquet' |
| 746 | + 'files/monaco_6593ca69_noclip_exploded.parquet' |
743 | 747 |
|
744 | 748 | Inspect the file with duckdb
|
745 | 749 | >>> duckdb.read_parquet(str(gpq_path)).order("feature_id") # doctest: +SKIP
|
@@ -788,7 +792,7 @@ def convert_pbf_to_parquet(
|
788 | 792 | ... )
|
789 | 793 | ... ) # doctest: +IGNORE_RESULT
|
790 | 794 | >>> gpq_path.as_posix()
|
791 |
| - 'files/maldives_nofilter_4eeabb20ccd8aefeaa80b9a46a202ab985fd454760823b7012cc7778498a085b_compact.parquet' |
| 795 | + 'files/maldives_nofilter_4eeabb20_compact.parquet' |
792 | 796 |
|
793 | 797 | Inspect the file with duckdb
|
794 | 798 | >>> duckdb.read_parquet(str(gpq_path)).order("feature_id") # doctest: +SKIP
|
@@ -942,7 +946,7 @@ def convert_geometry_to_parquet(
|
942 | 946 | ... )
|
943 | 947 | >>> gpq_path = qosm.convert_geometry_to_parquet(from_wkt(wkt)) # doctest: +IGNORE_RESULT
|
944 | 948 | >>> gpq_path.as_posix()
|
945 |
| - 'files/bf4b33debfd6d3e605555340606df6ce7eea934958c1f3477aca0ccf79e7929f_nofilter_compact.parquet' |
| 949 | + 'files/bf4b33de_nofilter_compact.parquet' |
946 | 950 |
|
947 | 951 | Inspect the file with duckdb
|
948 | 952 | >>> import duckdb
|
@@ -986,7 +990,7 @@ def convert_geometry_to_parquet(
|
986 | 990 | ... osm_extract_source='Geofabrik',
|
987 | 991 | ... ) # doctest: +IGNORE_RESULT
|
988 | 992 | >>> gpq_path.as_posix()
|
989 |
| - 'files/bf4b33debfd6d3e605555340606df6ce7eea934958c1f3477aca0ccf79e7929f_nofilter_compact.parquet' |
| 993 | + 'files/bf4b33de_nofilter_compact.parquet' |
990 | 994 |
|
991 | 995 | Inspect the file with duckdb
|
992 | 996 | >>> duckdb.read_parquet(str(gpq_path)).order("feature_id") # doctest: +SKIP
|
|
0 commit comments