Skip to content

Commit

Permalink
chore: simplify tags loading with new duckdb engine
Browse files Browse the repository at this point in the history
  • Loading branch information
RaczeQ committed Sep 24, 2024
1 parent cd14ef2 commit de7d119
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/base/test_pbf_file_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ def get_tags_from_osm_element(pbf_file: str, feature_id: str) -> dict[str, str]:
raw_tags = duckdb.sql(
f"SELECT tags FROM ST_READOSM('{pbf_file}') WHERE kind = '{kind}' AND id = {osm_id}"
).fetchone()[0]
return dict(zip(raw_tags["key"], raw_tags["value"]))
return cast(dict[str, str], raw_tags)


def extract_polygons_from_geometry(geometry: BaseGeometry) -> list[Union[Polygon, MultiPolygon]]:
Expand Down

0 comments on commit de7d119

Please sign in to comment.