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 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
@@ -24,10 +24,11 @@ class SRTM30Provider(DTMProvider):
24
24
  _author = "[iwatkot](https://github.com/iwatkot)"
25
25
 
26
26
  _instructions = (
27
- "ℹ️ Set the Multiplier value in the DEM Settings, when using this DTM provider. "
28
- "Otherwise, the dem file will contain values in meters exactly as on Earth "
29
- "and you probably won't see any terrain by eye. "
30
- "Note that the multiplier value may be big enough to make the terrain visible."
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):
@@ -305,8 +305,7 @@ class Texture(Component):
305
305
  useful_attributes = [
306
306
  "coordinates",
307
307
  "bbox",
308
- "map_height",
309
- "map_width",
308
+ "map_size",
310
309
  "rotation",
311
310
  "minimum_x",
312
311
  "minimum_y",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: maps4fs
3
- Version: 1.5.9
3
+ Version: 1.6.0
4
4
  Summary: Generate map templates for Farming Simulator from real places.
5
5
  Author-email: iwatkot <iwatkot@gmail.com>
6
6
  License: MIT License
@@ -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=vGz-gUg_JArqHO7qewdnSR7WiF7ciUzY-OSqOluUDWw,12304
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=sErusfv1AqQfP-veMrZ921Tz8DnGEhfB4ucggMmKrD4,31231
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=7uEb-Pde_uTG4D311mZ634QYkB5yvV8t2DfNfXuhYGY,3066
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.5.9.dist-info/LICENSE.md,sha256=pTKD_oUexcn-yccFCTrMeLkZy0ifLRa-VNcDLqLZaIw,10749
24
- maps4fs-1.5.9.dist-info/METADATA,sha256=CEhXKo9Y6Nqmh7SL-_BV7XSHtD7eApd8-81Grfd-zp4,36231
25
- maps4fs-1.5.9.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
26
- maps4fs-1.5.9.dist-info/top_level.txt,sha256=Ue9DSRlejRQRCaJueB0uLcKrWwsEq9zezfv5dI5mV1M,8
27
- maps4fs-1.5.9.dist-info/RECORD,,
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,,