maps4fs 1.5.9__py3-none-any.whl → 1.6.0__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.
Potentially problematic release.
This version of maps4fs might be problematic. Click here for more details.
- maps4fs/generator/dem.py +0 -52
- maps4fs/generator/dtm/srtm.py +5 -4
- maps4fs/generator/texture.py +1 -2
- {maps4fs-1.5.9.dist-info → maps4fs-1.6.0.dist-info}/METADATA +1 -1
- {maps4fs-1.5.9.dist-info → maps4fs-1.6.0.dist-info}/RECORD +8 -8
- {maps4fs-1.5.9.dist-info → maps4fs-1.6.0.dist-info}/LICENSE.md +0 -0
- {maps4fs-1.5.9.dist-info → maps4fs-1.6.0.dist-info}/WHEEL +0 -0
- {maps4fs-1.5.9.dist-info → maps4fs-1.6.0.dist-info}/top_level.txt +0 -0
maps4fs/generator/dem.py
CHANGED
@@ -280,55 +280,3 @@ class DEM(Component):
|
|
280
280
|
list: Empty list.
|
281
281
|
"""
|
282
282
|
return []
|
283
|
-
|
284
|
-
def _get_scaling_factor(self, maximum_deviation: int) -> float:
|
285
|
-
"""Calculate scaling factor for DEM data normalization.
|
286
|
-
NOTE: Needs reconsideration for the implementation.
|
287
|
-
|
288
|
-
Arguments:
|
289
|
-
maximum_deviation (int): Maximum deviation in DEM data.
|
290
|
-
|
291
|
-
Returns:
|
292
|
-
float: Scaling factor for DEM data normalization.
|
293
|
-
"""
|
294
|
-
ESTIMATED_MAXIMUM_DEVIATION = 1000 # pylint: disable=C0103
|
295
|
-
scaling_factor = maximum_deviation / ESTIMATED_MAXIMUM_DEVIATION
|
296
|
-
return scaling_factor if scaling_factor < 1 else 1
|
297
|
-
|
298
|
-
def _normalize_dem(self, data: np.ndarray) -> np.ndarray:
|
299
|
-
"""Normalize DEM data to 16-bit unsigned integer using max height from settings.
|
300
|
-
Arguments:
|
301
|
-
data (np.ndarray): DEM data from SRTM file after cropping.
|
302
|
-
Returns:
|
303
|
-
np.ndarray: Normalized DEM data.
|
304
|
-
"""
|
305
|
-
self.logger.debug("Starting DEM data normalization.")
|
306
|
-
# Calculate the difference between the maximum and minimum values in the DEM data.
|
307
|
-
|
308
|
-
max_height = data.max()
|
309
|
-
min_height = data.min()
|
310
|
-
max_dev = max_height - min_height
|
311
|
-
self.logger.debug(
|
312
|
-
"Maximum deviation: %s with maximum at %s and minimum at %s.",
|
313
|
-
max_dev,
|
314
|
-
max_height,
|
315
|
-
min_height,
|
316
|
-
)
|
317
|
-
|
318
|
-
scaling_factor = self._get_scaling_factor(max_dev)
|
319
|
-
adjusted_max_height = int(65535 * scaling_factor)
|
320
|
-
self.logger.debug(
|
321
|
-
"Maximum deviation: %s. Scaling factor: %s. Adjusted max height: %s.",
|
322
|
-
max_dev,
|
323
|
-
scaling_factor,
|
324
|
-
adjusted_max_height,
|
325
|
-
)
|
326
|
-
normalized_data = (
|
327
|
-
(data - data.min()) / (data.max() - data.min()) * adjusted_max_height
|
328
|
-
).astype("uint16")
|
329
|
-
self.logger.debug(
|
330
|
-
"DEM data was normalized to %s - %s.",
|
331
|
-
normalized_data.min(),
|
332
|
-
normalized_data.max(),
|
333
|
-
)
|
334
|
-
return normalized_data
|
maps4fs/generator/dtm/srtm.py
CHANGED
@@ -24,10 +24,11 @@ class SRTM30Provider(DTMProvider):
|
|
24
24
|
_author = "[iwatkot](https://github.com/iwatkot)"
|
25
25
|
|
26
26
|
_instructions = (
|
27
|
-
"ℹ️
|
28
|
-
"Otherwise,
|
29
|
-
"
|
30
|
-
"
|
27
|
+
"ℹ️ If you're a rookie in the Giants Editor check the **Apply the default multiplier** "
|
28
|
+
"checkbox. Otherwise, you can change the multiplier value in the DEM Settings. "
|
29
|
+
"If you will not apply the default multiplier and not change the value in the DEM "
|
30
|
+
"Settings, you'll have the DEM image with the original values as on Earth, which can "
|
31
|
+
"not be seen by eye and will lead to completely flat terrain. "
|
31
32
|
)
|
32
33
|
|
33
34
|
def __init__(self, *args, **kwargs):
|
maps4fs/generator/texture.py
CHANGED
@@ -4,7 +4,7 @@ maps4fs/generator/__init__.py,sha256=zZMLEkGzb4z0xql650gOtGSvcgX58DnJ2yN3vC2daRk
|
|
4
4
|
maps4fs/generator/background.py,sha256=moTsEJM-hZgHQQiBjFVTWBKgPMqxup-58EErh4bq_dE,21342
|
5
5
|
maps4fs/generator/component.py,sha256=RtXruvT4Fxfr7_xo9Bi-i3IIWcPd5QQOSpYJ_cNC49o,20408
|
6
6
|
maps4fs/generator/config.py,sha256=0QmK052B8bxyHVhg3jzCORLfOBMMmqVfhhbqXKf6OMk,4383
|
7
|
-
maps4fs/generator/dem.py,sha256=
|
7
|
+
maps4fs/generator/dem.py,sha256=gXmHRckXf9-3fNwEhZ8jk89oMn6eElghIQ1kUa0rcuk,10328
|
8
8
|
maps4fs/generator/game.py,sha256=QHgVnyGYvEnfwGZ84-u-dpbCRr3UeVVqBbrwr5WG8dE,7992
|
9
9
|
maps4fs/generator/grle.py,sha256=u8ZwSs313PIOkH_0B_O2tVTaZ-eYNkc30eKGtBxWzTM,17846
|
10
10
|
maps4fs/generator/i3d.py,sha256=FLVlj0g90IXRuaRARD1HTnufsLpuaa5kHKdiME-LUZY,24329
|
@@ -12,16 +12,16 @@ maps4fs/generator/map.py,sha256=-iUFGqe11Df-oUrxhcnJzRZ0o6NZKRQ_blTq1h1Wezg,9287
|
|
12
12
|
maps4fs/generator/qgis.py,sha256=Es8hLuqN_KH8lDfnJE6He2rWYbAKJ3RGPn-o87S6CPI,6116
|
13
13
|
maps4fs/generator/satellite.py,sha256=Qnb6XxmXKnHdHKVMb9mJ3vDGtGkDHCOv_81hrrXdx3k,3660
|
14
14
|
maps4fs/generator/settings.py,sha256=NWuK76ICr8gURQnzePat4JH9w-iACbQEKQebqu51gBE,4470
|
15
|
-
maps4fs/generator/texture.py,sha256=
|
15
|
+
maps4fs/generator/texture.py,sha256=7Z6Ci7urMvqk3-Jp9K2AKH2KlD1smEQS2qoc8Qzn8Uw,31204
|
16
16
|
maps4fs/generator/dtm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
17
17
|
maps4fs/generator/dtm/dtm.py,sha256=THQ3RWVL9ut7A4omS8hEog-oQSSwYV0JcDMe0Iiw4fY,8009
|
18
|
-
maps4fs/generator/dtm/srtm.py,sha256=
|
18
|
+
maps4fs/generator/dtm/srtm.py,sha256=x78VjI4onXxPx5CLrzpwEgFOA_E9f9zhouPdKC2YnBE,3190
|
19
19
|
maps4fs/generator/dtm/usgs.py,sha256=U0kDog1UAa1lWiK4Pe3nnhXnnplOS4HZde1yqYqCiDw,13123
|
20
20
|
maps4fs/toolbox/__init__.py,sha256=zZMLEkGzb4z0xql650gOtGSvcgX58DnJ2yN3vC2daRk,43
|
21
21
|
maps4fs/toolbox/background.py,sha256=9BXWNqs_n3HgqDiPztWylgYk_QM4YgBpe6_ZNQAWtSc,2154
|
22
22
|
maps4fs/toolbox/dem.py,sha256=z9IPFNmYbjiigb3t02ZenI3Mo8odd19c5MZbjDEovTo,3525
|
23
|
-
maps4fs-1.
|
24
|
-
maps4fs-1.
|
25
|
-
maps4fs-1.
|
26
|
-
maps4fs-1.
|
27
|
-
maps4fs-1.
|
23
|
+
maps4fs-1.6.0.dist-info/LICENSE.md,sha256=pTKD_oUexcn-yccFCTrMeLkZy0ifLRa-VNcDLqLZaIw,10749
|
24
|
+
maps4fs-1.6.0.dist-info/METADATA,sha256=36OOMtK0RoswMn9iyTDeJFuNeIVlhcmrDknK4Xe8HE4,36231
|
25
|
+
maps4fs-1.6.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
26
|
+
maps4fs-1.6.0.dist-info/top_level.txt,sha256=Ue9DSRlejRQRCaJueB0uLcKrWwsEq9zezfv5dI5mV1M,8
|
27
|
+
maps4fs-1.6.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|