Skip to content

Commit

Permalink
merging
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-schott committed Nov 6, 2023
2 parents 7dc815c + f723da6 commit 5e7338c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions open_buildings/download_buildings.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ def geojson_to_wkt(data: dict) -> str:
geometry = shape(data['geometry'])
return geometry.wkt

def geocode(data: str):
location = osmnx.geocode_to_gdf(data)
wkt = box(*location.total_bounds)
g2 = geojson.Feature(geometry=wkt)
return (g2)

def quadkey_to_geojson(quadkey: str) -> dict:
# Convert the quadkey to tile coordinates
tile = mercantile.quadkey_to_tile(quadkey)
Expand Down

0 comments on commit 5e7338c

Please sign in to comment.