diff --git a/pdm.lock b/pdm.lock index 795cdc99..ce5109eb 100644 --- a/pdm.lock +++ b/pdm.lock @@ -2269,7 +2269,7 @@ summary = "Backport of pathlib-compatible object wrapper for zip files" [metadata] lock_version = "4.1" -content_hash = "sha256:69feebcff5417c855bd230eb158693654e4a4107684cd817a4605559555e20e9" +content_hash = "sha256:f3b188dd838941bab3b77c987efc8e360a974fc724ba22f1aee3fbab80f3293e" [metadata.files] "aiohttp 3.8.4" = [ diff --git a/pyproject.toml b/pyproject.toml index aadf67e8..c1d54d35 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,6 +19,7 @@ dependencies = [ "tqdm", "s2", "typeguard", + "requests", ] requires-python = ">=3.8" readme = "README.md" @@ -52,7 +53,7 @@ Changelog = "https://github.com/srai-lab/srai/blob/main/CHANGELOG.md" # add tests # pdm add -G osm -osm = ["osmium", "osmnx", "overpass", "pillow", "requests"] +osm = ["osmium", "osmnx", "overpass", "pillow"] # pdm add -G voronoi voronoi = ["pymap3d", "haversine", "spherical-geometry"] # pdm add -G gtfs diff --git a/srai/loaders/osm_loaders/osm_tile_loader.py b/srai/loaders/osm_loaders/osm_tile_loader.py index b47c2dfb..2c2897c9 100644 --- a/srai/loaders/osm_loaders/osm_tile_loader.py +++ b/srai/loaders/osm_loaders/osm_tile_loader.py @@ -10,6 +10,7 @@ import geopandas as gpd import pandas as pd +import requests from srai.regionizers.slippy_map_regionizer import SlippyMapRegionizer from srai.utils._optional import import_optional_dependencies @@ -119,7 +120,6 @@ def get_tile_by_x_y(self, x: int, y: int, idx: Any = None) -> Any: y(int): y tile coordinate idx (Any): id of tile, if non created as x_y_self.zoom """ - import requests from PIL import Image if idx is None: