maps4fs 1.8.201__py3-none-any.whl → 1.8.203__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 +7 -9
- maps4fs/generator/dtm/lithuania.py +8 -6
- {maps4fs-1.8.201.dist-info → maps4fs-1.8.203.dist-info}/METADATA +9 -1
- {maps4fs-1.8.201.dist-info → maps4fs-1.8.203.dist-info}/RECORD +7 -7
- {maps4fs-1.8.201.dist-info → maps4fs-1.8.203.dist-info}/LICENSE.md +0 -0
- {maps4fs-1.8.201.dist-info → maps4fs-1.8.203.dist-info}/WHEEL +0 -0
- {maps4fs-1.8.201.dist-info → maps4fs-1.8.203.dist-info}/top_level.txt +0 -0
maps4fs/generator/dem.py
CHANGED
@@ -127,13 +127,11 @@ class DEM(Component):
|
|
127
127
|
|
128
128
|
if len(data.shape) != 2:
|
129
129
|
self.logger.error("DTM provider returned incorrect data: more than 1 channel.")
|
130
|
-
|
131
|
-
return
|
130
|
+
raise ValueError("DTM provider returned incorrect data: more than 1 channel.")
|
132
131
|
|
133
132
|
if data.dtype not in ["int16", "uint16", "float", "float32"]:
|
134
133
|
self.logger.error("DTM provider returned incorrect data type: %s.", data.dtype)
|
135
|
-
|
136
|
-
return
|
134
|
+
raise ValueError(f"DTM provider returned incorrect data type: {data.dtype}.")
|
137
135
|
|
138
136
|
self.logger.debug(
|
139
137
|
"DEM data was retrieved from DTM provider. Shape: %s, dtype: %s. Min: %s, max: %s.",
|
@@ -143,6 +141,11 @@ class DEM(Component):
|
|
143
141
|
data.max(),
|
144
142
|
)
|
145
143
|
|
144
|
+
# Check if the data contains any non zero values, otherwise raise an error.
|
145
|
+
if not np.any(data):
|
146
|
+
self.logger.error("DTM provider returned empty data.")
|
147
|
+
raise ValueError("DTM provider returned empty data.")
|
148
|
+
|
146
149
|
# 1. Resize DEM data to the output resolution.
|
147
150
|
resampled_data = self.resize_to_output(data)
|
148
151
|
|
@@ -312,11 +315,6 @@ class DEM(Component):
|
|
312
315
|
output_width=output_width,
|
313
316
|
)
|
314
317
|
|
315
|
-
def _save_empty_dem(self, dem_output_resolution: tuple[int, int]) -> None:
|
316
|
-
"""Saves empty DEM file filled with zeros."""
|
317
|
-
dem_data = np.zeros(dem_output_resolution, dtype="uint16")
|
318
|
-
cv2.imwrite(self._dem_path, dem_data)
|
319
|
-
|
320
318
|
def info_sequence(self) -> dict[Any, Any] | None: # type: ignore
|
321
319
|
"""Returns the information sequence for the component. Must be implemented in the child
|
322
320
|
class. If the component does not have an information sequence, an empty dictionary must be
|
@@ -19,12 +19,14 @@ class LithuaniaProvider(DTMProvider):
|
|
19
19
|
_author = "[Tox3](https://github.com/Tox3)"
|
20
20
|
_is_community = True
|
21
21
|
_is_base = False
|
22
|
-
_extents =
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
22
|
+
_extents = [
|
23
|
+
(
|
24
|
+
56.4501789128452,
|
25
|
+
53.8901567283941,
|
26
|
+
26.8198345671209,
|
27
|
+
20.9312456789123,
|
28
|
+
)
|
29
|
+
]
|
28
30
|
_max_tile_size = 4096
|
29
31
|
_url = (
|
30
32
|
"https://utility.arcgis.com/usrsvcs/servers/fef66dec83c14b0295180ecafa662aa0/"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: maps4fs
|
3
|
-
Version: 1.8.
|
3
|
+
Version: 1.8.203
|
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
|
@@ -225,6 +225,14 @@ docker run -d -p 8501:8501 --name maps4fs iwatkot/maps4fs
|
|
225
225
|
4. Fill in the required fields and click on the `Generate` button.
|
226
226
|
5. When the map is generated click on the `Download` button to get the map.
|
227
227
|
|
228
|
+
➡️ If you don't need Blender backend, you can use the **lite** version of the Docker image.
|
229
|
+
|
230
|
+
```bash
|
231
|
+
docker run -d -p 8501:8501 --name maps4fs iwatkot/maps4fs:*.*.*_lite
|
232
|
+
```
|
233
|
+
|
234
|
+
Remember to replace `*.*.*` with the version you want to use, e.g. `iwatkot/maps4fs:1.8.202_lite`. Also, pay attention that some features will not work in the lite version, such as removing the center part of the background mesh.
|
235
|
+
|
228
236
|
### Option 3: Python package or source code
|
229
237
|
|
230
238
|
🔴 Recommended for developers.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
maps4fs/__init__.py,sha256=EGvLVoRpSt4jITswsGbe1ISVmGAZAMQJcBmTwtyuVxI,335
|
2
2
|
maps4fs/logger.py,sha256=HQrDyj72mUjVYo25aR_-_SxVn2rfFjDCNbj-JKJdSnE,1488
|
3
3
|
maps4fs/generator/__init__.py,sha256=zZMLEkGzb4z0xql650gOtGSvcgX58DnJ2yN3vC2daRk,43
|
4
|
-
maps4fs/generator/dem.py,sha256=
|
4
|
+
maps4fs/generator/dem.py,sha256=Nyz64BWM---Vpy1mi8bbhHEfd2Wc2rWw9UqHraqXDJ8,11771
|
5
5
|
maps4fs/generator/game.py,sha256=NZaxj5z7WzMiHzAvQyr-TvVjGoHgqGldM6ZsItuYyzA,11292
|
6
6
|
maps4fs/generator/map.py,sha256=FA9ZLpVMS2RLRDgWZdOo-kLzqMUBza3EZ_89-Gfw_s4,11193
|
7
7
|
maps4fs/generator/qgis.py,sha256=Es8hLuqN_KH8lDfnJE6He2rWYbAKJ3RGPn-o87S6CPI,6116
|
@@ -33,7 +33,7 @@ maps4fs/generator/dtm/flanders.py,sha256=LltmowbS84_DaBHAS9XYoJPMunX6sWGy6zaVACH
|
|
33
33
|
maps4fs/generator/dtm/france.py,sha256=nk7MBJujBWJJzzy_pE5WsdyBCH16OQ5bnz4MsK-MVIQ,2654
|
34
34
|
maps4fs/generator/dtm/hessen.py,sha256=DtKBGvahM9fHq5h07M2n6N5X1G5CLDau4HMEe_2LqvY,966
|
35
35
|
maps4fs/generator/dtm/italy.py,sha256=mMzFtaxQYLF2rEeqX8k9R_LEmTWACFjPXRDY7wjv2Pk,1224
|
36
|
-
maps4fs/generator/dtm/lithuania.py,sha256=
|
36
|
+
maps4fs/generator/dtm/lithuania.py,sha256=R-KF3okFzxH7eiEh8tuMTwrnRYkKRgRJAjo65FgKm6I,2121
|
37
37
|
maps4fs/generator/dtm/mv.py,sha256=mpJhu2eDPDdI2J3xaegL6x58WWiiwPVFDOuSLEp_b5I,1364
|
38
38
|
maps4fs/generator/dtm/niedersachsen.py,sha256=XP1As-XMKS3Xmx0Mz1_8kxEQqGoGF3KKlrIpm_5VGYo,1275
|
39
39
|
maps4fs/generator/dtm/norway.py,sha256=PzYFJOx3Y6tuhir2Hy8BDSoI9FzQu01__dEzWrQXM1g,1285
|
@@ -52,8 +52,8 @@ maps4fs/toolbox/__init__.py,sha256=zZMLEkGzb4z0xql650gOtGSvcgX58DnJ2yN3vC2daRk,4
|
|
52
52
|
maps4fs/toolbox/background.py,sha256=RclEqxEWLbMxuEkkegQP8jybzugwQ1_R3rdfDe0s21U,2104
|
53
53
|
maps4fs/toolbox/custom_osm.py,sha256=X6ZlPqiOhNjkmdD_qVroIfdOl9Rb90cDwVSLDVYgx80,1892
|
54
54
|
maps4fs/toolbox/dem.py,sha256=z9IPFNmYbjiigb3t02ZenI3Mo8odd19c5MZbjDEovTo,3525
|
55
|
-
maps4fs-1.8.
|
56
|
-
maps4fs-1.8.
|
57
|
-
maps4fs-1.8.
|
58
|
-
maps4fs-1.8.
|
59
|
-
maps4fs-1.8.
|
55
|
+
maps4fs-1.8.203.dist-info/LICENSE.md,sha256=pTKD_oUexcn-yccFCTrMeLkZy0ifLRa-VNcDLqLZaIw,10749
|
56
|
+
maps4fs-1.8.203.dist-info/METADATA,sha256=Tn1n5I9toTV6kR2wqich_b3MzQ9AL11zA7WXoLe1yLo,45409
|
57
|
+
maps4fs-1.8.203.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
58
|
+
maps4fs-1.8.203.dist-info/top_level.txt,sha256=Ue9DSRlejRQRCaJueB0uLcKrWwsEq9zezfv5dI5mV1M,8
|
59
|
+
maps4fs-1.8.203.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|