Skip to content

Commit a4ab7d0

Browse files
committed
Minor updates
1 parent a51d979 commit a4ab7d0

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Blueprints are customizable workflows that help developers build AI applications using open-source tools and models
44

5-
These docs are your companion to mastering the **OSM-AI-Helper Blueprint**.
5+
These docs are your companion to mastering the **OpenStreetMap AI Helper Blueprint**.
66

77
### Built with
88
- Python 3.10+

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ repo_name: osm-ai-helper
55
nav:
66
- Home: index.md
77
- Getting Started: getting-started.md
8+
- Authorization: authorization.md
89
- Step-by-Step Guide: step-by-step-guide.md
910
- Customization: customization.md
10-
- Authorization: authorization.md
1111
- API Reference: api.md
1212
- Future Features & Contributions: future-features-contributions.md
1313

src/osm_ai_helper/utils/inference.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ def grouped_elements_to_mask(group, zoom, tile_col, tile_row):
3535
return mask
3636

3737

38-
def download_stacked_image_and_mask(bbox, grouped_elements, zoom, token):
38+
def download_stacked_image_and_mask(
39+
bbox: tuple[float, float, float, float],
40+
grouped_elements: dict,
41+
zoom: int,
42+
mapbox_token: str,
43+
) -> tuple[np.ndarray, np.ndarray]:
3944
"""Download all tiles within a bounding box and stack them into a single image.
4045
4146
All the grouped_elements are painted on the mask.
@@ -46,7 +51,7 @@ def download_stacked_image_and_mask(bbox, grouped_elements, zoom, token):
4651
[group_elements_by_tile][osm_ai_helper.utils.tiles.group_elements_by_tile].
4752
zoom (int): Zoom level.
4853
See https://docs.mapbox.com/help/glossary/zoom-level/.
49-
token (str): Mapbox token.
54+
mapbox_token (str): Mapbox token.
5055
See https://docs.mapbox.com/help/getting-started/access-tokens/.
5156
5257
Returns:
@@ -67,7 +72,7 @@ def download_stacked_image_and_mask(bbox, grouped_elements, zoom, token):
6772
for n_row, tile_row in enumerate(range(top, bottom)):
6873
group = grouped_elements[(tile_col, tile_row)]
6974

70-
img = download_tile(zoom, tile_col, tile_row, token)
75+
img = download_tile(zoom, tile_col, tile_row, mapbox_token)
7176

7277
mask = grouped_elements_to_mask(group, zoom, tile_col, tile_row)
7378

0 commit comments

Comments
 (0)