maps4fs 0.8.7__py3-none-any.whl → 0.8.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- maps4fs/generator/component.py +14 -7
- maps4fs/generator/config.py +1 -1
- {maps4fs-0.8.7.dist-info → maps4fs-0.8.8.dist-info}/METADATA +1 -1
- {maps4fs-0.8.7.dist-info → maps4fs-0.8.8.dist-info}/RECORD +7 -7
- {maps4fs-0.8.7.dist-info → maps4fs-0.8.8.dist-info}/LICENSE.md +0 -0
- {maps4fs-0.8.7.dist-info → maps4fs-0.8.8.dist-info}/WHEEL +0 -0
- {maps4fs-0.8.7.dist-info → maps4fs-0.8.8.dist-info}/top_level.txt +0 -0
maps4fs/generator/component.py
CHANGED
@@ -138,7 +138,8 @@ class Component:
|
|
138
138
|
def get_bbox(
|
139
139
|
self,
|
140
140
|
coordinates: tuple[float, float] | None = None,
|
141
|
-
|
141
|
+
height_distance: int | None = None,
|
142
|
+
width_distance: int | None = None,
|
142
143
|
project_utm: bool = False,
|
143
144
|
) -> tuple[int, int, int, int]:
|
144
145
|
"""Calculates the bounding box of the map from the coordinates and the height and
|
@@ -148,28 +149,34 @@ class Component:
|
|
148
149
|
Args:
|
149
150
|
coordinates (tuple[float, float], optional): The latitude and longitude of the center of
|
150
151
|
the map. Defaults to None.
|
151
|
-
|
152
|
-
map. Defaults to None.
|
152
|
+
height_distance (int, optional): The distance from the center of the map to the edge of
|
153
|
+
the map in the north-south direction. Defaults to None.
|
154
|
+
width_distance (int, optional): The distance from the center of the map to the edge of
|
155
|
+
the map in the east-west direction. Defaults to None.
|
153
156
|
project_utm (bool, optional): Whether to project the bounding box to UTM.
|
154
157
|
|
155
158
|
Returns:
|
156
159
|
tuple[int, int, int, int]: The bounding box of the map.
|
157
160
|
"""
|
158
161
|
coordinates = coordinates or self.coordinates
|
159
|
-
|
162
|
+
height_distance = height_distance or int(self.map_height / 2)
|
163
|
+
width_distance = width_distance or int(self.map_width / 2)
|
160
164
|
|
161
165
|
north, south, _, _ = ox.utils_geo.bbox_from_point(
|
162
|
-
coordinates, dist=
|
166
|
+
coordinates, dist=height_distance, project_utm=project_utm
|
163
167
|
)
|
164
168
|
_, _, east, west = ox.utils_geo.bbox_from_point(
|
165
|
-
coordinates, dist=
|
169
|
+
coordinates, dist=width_distance, project_utm=project_utm
|
166
170
|
)
|
167
171
|
bbox = north, south, east, west
|
168
172
|
self.logger.debug(
|
169
|
-
"Calculated bounding box for component: %s: %s, project_utm: %s"
|
173
|
+
"Calculated bounding box for component: %s: %s, project_utm: %s, "
|
174
|
+
"height_distance: %s, width_distance: %s",
|
170
175
|
self.__class__.__name__,
|
171
176
|
bbox,
|
172
177
|
project_utm,
|
178
|
+
height_distance,
|
179
|
+
width_distance,
|
173
180
|
)
|
174
181
|
return bbox
|
175
182
|
|
maps4fs/generator/config.py
CHANGED
@@ -67,7 +67,7 @@ class Config(Component):
|
|
67
67
|
# if the map is 2048x2048 or 4096x4096, the overview will be 4096x4096
|
68
68
|
# and the map will be in the center of the overview.
|
69
69
|
# That's why the distance is set to the map height not as a half of it.
|
70
|
-
bbox = self.get_bbox(
|
70
|
+
bbox = self.get_bbox(height_distance=self.map_height, width_distance=self.map_width)
|
71
71
|
south, west, north, east = bbox
|
72
72
|
epsg3857_string = self.get_epsg3857_string(bbox=bbox)
|
73
73
|
|
@@ -2,8 +2,8 @@ maps4fs/__init__.py,sha256=da4jmND2Ths9AffnkAKgzLHNkvKFOc_l21gJisPXqWY,155
|
|
2
2
|
maps4fs/logger.py,sha256=CneeHxQywjNUJXqQrUUSeiDxu95FfrfyK_Si1v0gMZ8,1477
|
3
3
|
maps4fs/generator/__init__.py,sha256=zZMLEkGzb4z0xql650gOtGSvcgX58DnJ2yN3vC2daRk,43
|
4
4
|
maps4fs/generator/background.py,sha256=YZbTSijKgNQOvpWJHqCJNHeoV5GxUjp79b8PoQwRQH0,10778
|
5
|
-
maps4fs/generator/component.py,sha256=
|
6
|
-
maps4fs/generator/config.py,sha256=
|
5
|
+
maps4fs/generator/component.py,sha256=g3IBC8ul9zmcG9tHvyPJIg8hxBHFR8kB8Smw9yMW3qA,7864
|
6
|
+
maps4fs/generator/config.py,sha256=JkRexT_ZclRa_x0w6ojgG-Tsu4NoshFTUGycRFdfrVk,3463
|
7
7
|
maps4fs/generator/dem.py,sha256=FsYcaf0IQSYykKdbkHxAN5-Rc_PZZEBJfdZA2Z-b8AU,14514
|
8
8
|
maps4fs/generator/game.py,sha256=94HjPNOyy6XSSOnBp-uxrkBglKyC-X3ULIrrucfdlKw,6825
|
9
9
|
maps4fs/generator/i3d.py,sha256=UuQiQRusPQ2f6PvGKxJ_UZeXsx3uG15efmy8Ysnm3F8,3597
|
@@ -11,8 +11,8 @@ maps4fs/generator/map.py,sha256=BS8ylTCRlHRmbImg73wnHMpBB2ODckVyVZq5KJhCMfM,4236
|
|
11
11
|
maps4fs/generator/path_steps.py,sha256=rKslIiG9mriCVL9_0i8Oet2p0DITrpBWi0pECpvuyUM,2707
|
12
12
|
maps4fs/generator/texture.py,sha256=0gkohGmamZbmqc9VpPqt8pli_x9w9SnUh2JjYGaiI3I,18170
|
13
13
|
maps4fs/generator/tile.py,sha256=3vmfjQiPiiUZKPuIo5tg2rOKkgcP1NRVkMGK-Vo10-A,2138
|
14
|
-
maps4fs-0.8.
|
15
|
-
maps4fs-0.8.
|
16
|
-
maps4fs-0.8.
|
17
|
-
maps4fs-0.8.
|
18
|
-
maps4fs-0.8.
|
14
|
+
maps4fs-0.8.8.dist-info/LICENSE.md,sha256=-JY0v7p3dwXze61EbYiK7YEJ2aKrjaFZ8y2xYEOrmRY,1068
|
15
|
+
maps4fs-0.8.8.dist-info/METADATA,sha256=X4Itc4SeeLiMW-2OIysHfKnpLM0MfqAIb1JduUK2Mq0,23799
|
16
|
+
maps4fs-0.8.8.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
17
|
+
maps4fs-0.8.8.dist-info/top_level.txt,sha256=Ue9DSRlejRQRCaJueB0uLcKrWwsEq9zezfv5dI5mV1M,8
|
18
|
+
maps4fs-0.8.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|