maps4fs 0.7.5__py3-none-any.whl → 0.7.7__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/dem.py +25 -3
- {maps4fs-0.7.5.dist-info → maps4fs-0.7.7.dist-info}/METADATA +1 -1
- {maps4fs-0.7.5.dist-info → maps4fs-0.7.7.dist-info}/RECORD +6 -6
- {maps4fs-0.7.5.dist-info → maps4fs-0.7.7.dist-info}/LICENSE.md +0 -0
- {maps4fs-0.7.5.dist-info → maps4fs-0.7.7.dist-info}/WHEEL +0 -0
- {maps4fs-0.7.5.dist-info → maps4fs-0.7.7.dist-info}/top_level.txt +0 -0
maps4fs/generator/dem.py
CHANGED
@@ -13,7 +13,7 @@ import requests
|
|
13
13
|
from maps4fs.generator.component import Component
|
14
14
|
|
15
15
|
SRTM = "https://elevation-tiles-prod.s3.amazonaws.com/skadi/{latitude_band}/{tile_name}.hgt.gz"
|
16
|
-
DEFAULT_MULTIPLIER =
|
16
|
+
DEFAULT_MULTIPLIER = 1
|
17
17
|
DEFAULT_BLUR_RADIUS = 21
|
18
18
|
|
19
19
|
|
@@ -125,6 +125,13 @@ class DEM(Component):
|
|
125
125
|
"Gaussion blur applied to DEM data with kernel size %s.",
|
126
126
|
self.blur_radius,
|
127
127
|
)
|
128
|
+
self.logger.debug(
|
129
|
+
"DEM data was blurred. Shape: %s, dtype: %s. Min: %s, max: %s.",
|
130
|
+
resampled_data.shape,
|
131
|
+
resampled_data.dtype,
|
132
|
+
resampled_data.min(),
|
133
|
+
resampled_data.max(),
|
134
|
+
)
|
128
135
|
|
129
136
|
cv2.imwrite(self._dem_path, resampled_data)
|
130
137
|
self.logger.debug("DEM data was saved to %s.", self._dem_path)
|
@@ -244,13 +251,28 @@ class DEM(Component):
|
|
244
251
|
|
245
252
|
self.logger.debug("Creating colored preview of DEM data in %s.", colored_dem_path)
|
246
253
|
|
247
|
-
dem_data = cv2.imread(self._dem_path, cv2.
|
254
|
+
dem_data = cv2.imread(self._dem_path, cv2.IMREAD_UNCHANGED)
|
255
|
+
|
256
|
+
self.logger.debug(
|
257
|
+
"DEM data before normalization. Shape: %s, dtype: %s. Min: %s, max: %s.",
|
258
|
+
dem_data.shape,
|
259
|
+
dem_data.dtype,
|
260
|
+
dem_data.min(),
|
261
|
+
dem_data.max(),
|
262
|
+
)
|
248
263
|
|
249
|
-
# Create an empty array with the same shape and type as dem_data
|
264
|
+
# Create an empty array with the same shape and type as dem_data.
|
250
265
|
dem_data_normalized = np.empty_like(dem_data)
|
251
266
|
|
252
267
|
# Normalize the DEM data to the range [0, 255]
|
253
268
|
cv2.normalize(dem_data, dem_data_normalized, 0, 255, cv2.NORM_MINMAX)
|
269
|
+
self.logger.debug(
|
270
|
+
"DEM data after normalization. Shape: %s, dtype: %s. Min: %s, max: %s.",
|
271
|
+
dem_data_normalized.shape,
|
272
|
+
dem_data_normalized.dtype,
|
273
|
+
dem_data_normalized.min(),
|
274
|
+
dem_data_normalized.max(),
|
275
|
+
)
|
254
276
|
dem_data_colored = cv2.applyColorMap(dem_data_normalized, cv2.COLORMAP_JET)
|
255
277
|
|
256
278
|
cv2.imwrite(colored_dem_path, dem_data_colored)
|
@@ -3,12 +3,12 @@ maps4fs/logger.py,sha256=CneeHxQywjNUJXqQrUUSeiDxu95FfrfyK_Si1v0gMZ8,1477
|
|
3
3
|
maps4fs/generator/__init__.py,sha256=zZMLEkGzb4z0xql650gOtGSvcgX58DnJ2yN3vC2daRk,43
|
4
4
|
maps4fs/generator/component.py,sha256=BU_HNNyKXuEBohQJRTlXmNdSNrjolwX-ZzqqSSuzTrE,3463
|
5
5
|
maps4fs/generator/config.py,sha256=luDYXkKjgOM4-Mft4mHDPP6v-DVIUyWZAMAsCKyvaoY,2108
|
6
|
-
maps4fs/generator/dem.py,sha256=
|
6
|
+
maps4fs/generator/dem.py,sha256=n2lHb8wb18yo9BNVQxyfke7U1pKQKhR3tnhYrLtobn4,11318
|
7
7
|
maps4fs/generator/game.py,sha256=dfbLyu1yqbHkBWmJu1uANCX-84vkdlvqR6hA6JCiIsE,6107
|
8
8
|
maps4fs/generator/map.py,sha256=zLIFAjjz-Y7u_FG-UjYoGiqBreLwuverkYY8Er9L_Qg,3796
|
9
9
|
maps4fs/generator/texture.py,sha256=cEXQOLJ5Iq_Nb0C9OmU-9PR-E_5cgM1Q62kG49G3VNg,16019
|
10
|
-
maps4fs-0.7.
|
11
|
-
maps4fs-0.7.
|
12
|
-
maps4fs-0.7.
|
13
|
-
maps4fs-0.7.
|
14
|
-
maps4fs-0.7.
|
10
|
+
maps4fs-0.7.7.dist-info/LICENSE.md,sha256=-JY0v7p3dwXze61EbYiK7YEJ2aKrjaFZ8y2xYEOrmRY,1068
|
11
|
+
maps4fs-0.7.7.dist-info/METADATA,sha256=SNAXRoxW_G5CnSqNckvuLqfwjb_0HN6VGvYba-NbcMc,11844
|
12
|
+
maps4fs-0.7.7.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
13
|
+
maps4fs-0.7.7.dist-info/top_level.txt,sha256=Ue9DSRlejRQRCaJueB0uLcKrWwsEq9zezfv5dI5mV1M,8
|
14
|
+
maps4fs-0.7.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|