maps4fs 2.2.0__tar.gz → 2.2.2__tar.gz
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-2.2.0 → maps4fs-2.2.2}/PKG-INFO +22 -5
- {maps4fs-2.2.0 → maps4fs-2.2.2}/README.md +21 -4
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs/generator/component/background.py +1 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs/generator/component/base/component.py +10 -2
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs.egg-info/PKG-INFO +22 -5
- {maps4fs-2.2.0 → maps4fs-2.2.2}/pyproject.toml +1 -1
- {maps4fs-2.2.0 → maps4fs-2.2.2}/LICENSE.md +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs/__init__.py +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs/generator/__init__.py +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs/generator/component/__init__.py +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs/generator/component/base/__init__.py +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs/generator/component/base/component_image.py +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs/generator/component/base/component_mesh.py +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs/generator/component/base/component_xml.py +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs/generator/component/config.py +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs/generator/component/dem.py +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs/generator/component/grle.py +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs/generator/component/i3d.py +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs/generator/component/layer.py +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs/generator/component/satellite.py +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs/generator/component/texture.py +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs/generator/config.py +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs/generator/game.py +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs/generator/map.py +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs/generator/qgis.py +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs/generator/settings.py +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs/generator/statistics.py +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs/logger.py +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs.egg-info/SOURCES.txt +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs.egg-info/dependency_links.txt +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs.egg-info/requires.txt +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/maps4fs.egg-info/top_level.txt +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/setup.cfg +0 -0
- {maps4fs-2.2.0 → maps4fs-2.2.2}/tests/test_generator.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: maps4fs
|
3
|
-
Version: 2.2.
|
3
|
+
Version: 2.2.2
|
4
4
|
Summary: Generate map templates for Farming Simulator from real places.
|
5
5
|
Author-email: iwatkot <iwatkot@gmail.com>
|
6
6
|
License: Apache License 2.0
|
@@ -45,7 +45,7 @@ Dynamic: license-file
|
|
45
45
|
|
46
46
|
<div align="center" markdown>
|
47
47
|
<a href="https://discord.gg/Sj5QKKyE42">
|
48
|
-
<img src="https://github.com/
|
48
|
+
<img src="https://github.com/iwatkot/maps4fs/releases/download/2.2.0/maps4fs-poster-discord-mymaps.png">
|
49
49
|
</a>
|
50
50
|
|
51
51
|
<p align="center">
|
@@ -54,6 +54,7 @@ Dynamic: license-file
|
|
54
54
|
<a href="docs/step_by_step.md">Create a map in 10 steps</a> •
|
55
55
|
<a href="docs/recommendations.md">Practical recommendations</a> •
|
56
56
|
<a href="#How-To-Run">How-To-Run</a><br>
|
57
|
+
<a href="docs/my_maps.md">My Maps</a> •
|
57
58
|
<a href="docs/FAQ.md">FAQ</a> •
|
58
59
|
<a href="docs/map_structure.md">Map Structure</a> •
|
59
60
|
<a href="#Schemas-Editor">Schemas Editor</a> •
|
@@ -85,8 +86,10 @@ Dynamic: license-file
|
|
85
86
|
|
86
87
|
</div>
|
87
88
|
|
89
|
+
🔥🔥🔥🗂️ Track, store and organize all your maps using the [My Maps](docs/my_maps.md) feature. 🔥🔥🔥<br>
|
90
|
+
<br>
|
88
91
|
🗺️ Supports 2x2, 4x4, 8x8, 16x16 and any custom size maps<br>
|
89
|
-
🔗 Generate maps using an [API](https://github.com/iwatkot/maps4fsapi)
|
92
|
+
🔗 Generate maps using an [API](https://github.com/iwatkot/maps4fsapi)<br>
|
90
93
|
✂️ Supports map scaling<br>
|
91
94
|
🔄 Support map rotation<br>
|
92
95
|
🌐 Supports custom [DTM Providers](https://github.com/iwatkot/pydtmdl)<br>
|
@@ -158,6 +161,14 @@ There are several ways to use the tool. You obviously need the **first one**, bu
|
|
158
161
|
docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs iwatkot/maps4fs
|
159
162
|
```
|
160
163
|
|
164
|
+
If you want to persist your data, you can mount a directory to the container:
|
165
|
+
|
166
|
+
```bash
|
167
|
+
docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs -v /c/maps4fs:/usr/src/app/mfsrootdir iwatkot/maps4fs
|
168
|
+
```
|
169
|
+
|
170
|
+
Learn more in the [My Maps](docs/my_maps.md) documentation.
|
171
|
+
|
161
172
|
And open [http://localhost:8501](http://localhost:8501) in your browser.<br>
|
162
173
|
If you don't know how to use Docker, navigate to the [Docker version](#option-2-docker-version), it's really simple.<br>
|
163
174
|
Check out the [Docker FAQ](docs/FAQ_docker.md) if you have any questions.<br>
|
@@ -212,8 +223,8 @@ Don't know where to start? Don't worry, just follow this [step-by-step guide](do
|
|
212
223
|
🛠️ Don't need to install anything.
|
213
224
|
🗺️ Supported map sizes: 2x2, 4x4.
|
214
225
|
✂️ Map scaling: not supported.
|
215
|
-
⚙️ Advanced settings:
|
216
|
-
🖼️ Texture dissolving:
|
226
|
+
⚙️ Advanced settings: partial.
|
227
|
+
🖼️ Texture dissolving: disabled.
|
217
228
|
Using the public version on [maps4fs.xyz](https://maps4fs.xyz) is the easiest way to generate a map template. Just open the link and follow the instructions.
|
218
229
|
Note: due to CPU and RAM limitations of the hosting, the generation may take some time. If you need faster processing, use the [Docker version](#option-2-docker-version).<br>
|
219
230
|
|
@@ -240,6 +251,12 @@ You can launch the project with minimalistic UI in your browser using Docker. Fo
|
|
240
251
|
docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs iwatkot/maps4fs
|
241
252
|
```
|
242
253
|
|
254
|
+
If you want to persist your data, you can mount a directory to the container:
|
255
|
+
|
256
|
+
```bash
|
257
|
+
docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs -v /c/maps4fs:/usr/src/app/mfsrootdir iwatkot/maps4fs
|
258
|
+
```
|
259
|
+
|
243
260
|
3. Open your browser and go to [http://localhost:8501](http://localhost:8501).
|
244
261
|
4. Fill in the required fields and click on the `Generate` button.
|
245
262
|
5. When the map is generated click on the `Download` button to get the map.
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
<div align="center" markdown>
|
16
16
|
<a href="https://discord.gg/Sj5QKKyE42">
|
17
|
-
<img src="https://github.com/
|
17
|
+
<img src="https://github.com/iwatkot/maps4fs/releases/download/2.2.0/maps4fs-poster-discord-mymaps.png">
|
18
18
|
</a>
|
19
19
|
|
20
20
|
<p align="center">
|
@@ -23,6 +23,7 @@
|
|
23
23
|
<a href="docs/step_by_step.md">Create a map in 10 steps</a> •
|
24
24
|
<a href="docs/recommendations.md">Practical recommendations</a> •
|
25
25
|
<a href="#How-To-Run">How-To-Run</a><br>
|
26
|
+
<a href="docs/my_maps.md">My Maps</a> •
|
26
27
|
<a href="docs/FAQ.md">FAQ</a> •
|
27
28
|
<a href="docs/map_structure.md">Map Structure</a> •
|
28
29
|
<a href="#Schemas-Editor">Schemas Editor</a> •
|
@@ -54,8 +55,10 @@
|
|
54
55
|
|
55
56
|
</div>
|
56
57
|
|
58
|
+
🔥🔥🔥🗂️ Track, store and organize all your maps using the [My Maps](docs/my_maps.md) feature. 🔥🔥🔥<br>
|
59
|
+
<br>
|
57
60
|
🗺️ Supports 2x2, 4x4, 8x8, 16x16 and any custom size maps<br>
|
58
|
-
🔗 Generate maps using an [API](https://github.com/iwatkot/maps4fsapi)
|
61
|
+
🔗 Generate maps using an [API](https://github.com/iwatkot/maps4fsapi)<br>
|
59
62
|
✂️ Supports map scaling<br>
|
60
63
|
🔄 Support map rotation<br>
|
61
64
|
🌐 Supports custom [DTM Providers](https://github.com/iwatkot/pydtmdl)<br>
|
@@ -127,6 +130,14 @@ There are several ways to use the tool. You obviously need the **first one**, bu
|
|
127
130
|
docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs iwatkot/maps4fs
|
128
131
|
```
|
129
132
|
|
133
|
+
If you want to persist your data, you can mount a directory to the container:
|
134
|
+
|
135
|
+
```bash
|
136
|
+
docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs -v /c/maps4fs:/usr/src/app/mfsrootdir iwatkot/maps4fs
|
137
|
+
```
|
138
|
+
|
139
|
+
Learn more in the [My Maps](docs/my_maps.md) documentation.
|
140
|
+
|
130
141
|
And open [http://localhost:8501](http://localhost:8501) in your browser.<br>
|
131
142
|
If you don't know how to use Docker, navigate to the [Docker version](#option-2-docker-version), it's really simple.<br>
|
132
143
|
Check out the [Docker FAQ](docs/FAQ_docker.md) if you have any questions.<br>
|
@@ -181,8 +192,8 @@ Don't know where to start? Don't worry, just follow this [step-by-step guide](do
|
|
181
192
|
🛠️ Don't need to install anything.
|
182
193
|
🗺️ Supported map sizes: 2x2, 4x4.
|
183
194
|
✂️ Map scaling: not supported.
|
184
|
-
⚙️ Advanced settings:
|
185
|
-
🖼️ Texture dissolving:
|
195
|
+
⚙️ Advanced settings: partial.
|
196
|
+
🖼️ Texture dissolving: disabled.
|
186
197
|
Using the public version on [maps4fs.xyz](https://maps4fs.xyz) is the easiest way to generate a map template. Just open the link and follow the instructions.
|
187
198
|
Note: due to CPU and RAM limitations of the hosting, the generation may take some time. If you need faster processing, use the [Docker version](#option-2-docker-version).<br>
|
188
199
|
|
@@ -209,6 +220,12 @@ You can launch the project with minimalistic UI in your browser using Docker. Fo
|
|
209
220
|
docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs iwatkot/maps4fs
|
210
221
|
```
|
211
222
|
|
223
|
+
If you want to persist your data, you can mount a directory to the container:
|
224
|
+
|
225
|
+
```bash
|
226
|
+
docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs -v /c/maps4fs:/usr/src/app/mfsrootdir iwatkot/maps4fs
|
227
|
+
```
|
228
|
+
|
212
229
|
3. Open your browser and go to [http://localhost:8501](http://localhost:8501).
|
213
230
|
4. Fill in the required fields and click on the `Generate` button.
|
214
231
|
5. When the map is generated click on the `Download` button to get the map.
|
@@ -597,6 +597,7 @@ class Background(MeshComponent, ImageComponent):
|
|
597
597
|
polygon_points=polygon.exterior.coords,
|
598
598
|
angle=self.rotation,
|
599
599
|
canvas_size=self.background_size,
|
600
|
+
xshift=-Parameters.BACKGROUND_DISTANCE,
|
600
601
|
)
|
601
602
|
fitted_polygon = shapely.Polygon(fitted_polygon_points)
|
602
603
|
fitted_polygons.append(fitted_polygon)
|
@@ -365,6 +365,8 @@ class Component:
|
|
365
365
|
angle: int = 0,
|
366
366
|
border: int = 0,
|
367
367
|
canvas_size: int | None = None,
|
368
|
+
xshift: int = 0,
|
369
|
+
yshift: int = 0,
|
368
370
|
) -> list[tuple[int, int]]:
|
369
371
|
"""Fits a polygon into the bounds of the map.
|
370
372
|
|
@@ -374,6 +376,9 @@ class Component:
|
|
374
376
|
margin (int, optional): The margin to add to the polygon. Defaults to 0.
|
375
377
|
angle (int, optional): The angle to rotate the polygon by. Defaults to 0.
|
376
378
|
border (int, optional): The border to add to the bounds. Defaults to 0.
|
379
|
+
canvas_size (int, optional): The size of the canvas. Defaults to None.
|
380
|
+
xshift (int, optional): The x-axis shift to apply. Will be added to calculated offset.
|
381
|
+
yshift (int, optional): The y-axis shift to apply. Will be added to calculated offset.
|
377
382
|
|
378
383
|
Returns:
|
379
384
|
list[tuple[int, int]]: The points of the polygon fitted into the map bounds.
|
@@ -400,8 +405,11 @@ class Component:
|
|
400
405
|
)
|
401
406
|
osm_object = rotate(osm_object, -angle, origin=(center_x, center_y))
|
402
407
|
offset = int((self.map_size / 2) - (self.map_rotated_size / 2)) * self.map.size_scale
|
403
|
-
|
404
|
-
|
408
|
+
xoff = yoff = offset
|
409
|
+
xoff += xshift
|
410
|
+
yoff += yshift
|
411
|
+
self.logger.debug("Translating the osm_object by X: %s, Y: %s", xoff, yoff)
|
412
|
+
osm_object = translate(osm_object, xoff=xoff, yoff=yoff)
|
405
413
|
self.logger.debug("Rotated and translated the osm_object.")
|
406
414
|
|
407
415
|
if margin and object_type is Polygon:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: maps4fs
|
3
|
-
Version: 2.2.
|
3
|
+
Version: 2.2.2
|
4
4
|
Summary: Generate map templates for Farming Simulator from real places.
|
5
5
|
Author-email: iwatkot <iwatkot@gmail.com>
|
6
6
|
License: Apache License 2.0
|
@@ -45,7 +45,7 @@ Dynamic: license-file
|
|
45
45
|
|
46
46
|
<div align="center" markdown>
|
47
47
|
<a href="https://discord.gg/Sj5QKKyE42">
|
48
|
-
<img src="https://github.com/
|
48
|
+
<img src="https://github.com/iwatkot/maps4fs/releases/download/2.2.0/maps4fs-poster-discord-mymaps.png">
|
49
49
|
</a>
|
50
50
|
|
51
51
|
<p align="center">
|
@@ -54,6 +54,7 @@ Dynamic: license-file
|
|
54
54
|
<a href="docs/step_by_step.md">Create a map in 10 steps</a> •
|
55
55
|
<a href="docs/recommendations.md">Practical recommendations</a> •
|
56
56
|
<a href="#How-To-Run">How-To-Run</a><br>
|
57
|
+
<a href="docs/my_maps.md">My Maps</a> •
|
57
58
|
<a href="docs/FAQ.md">FAQ</a> •
|
58
59
|
<a href="docs/map_structure.md">Map Structure</a> •
|
59
60
|
<a href="#Schemas-Editor">Schemas Editor</a> •
|
@@ -85,8 +86,10 @@ Dynamic: license-file
|
|
85
86
|
|
86
87
|
</div>
|
87
88
|
|
89
|
+
🔥🔥🔥🗂️ Track, store and organize all your maps using the [My Maps](docs/my_maps.md) feature. 🔥🔥🔥<br>
|
90
|
+
<br>
|
88
91
|
🗺️ Supports 2x2, 4x4, 8x8, 16x16 and any custom size maps<br>
|
89
|
-
🔗 Generate maps using an [API](https://github.com/iwatkot/maps4fsapi)
|
92
|
+
🔗 Generate maps using an [API](https://github.com/iwatkot/maps4fsapi)<br>
|
90
93
|
✂️ Supports map scaling<br>
|
91
94
|
🔄 Support map rotation<br>
|
92
95
|
🌐 Supports custom [DTM Providers](https://github.com/iwatkot/pydtmdl)<br>
|
@@ -158,6 +161,14 @@ There are several ways to use the tool. You obviously need the **first one**, bu
|
|
158
161
|
docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs iwatkot/maps4fs
|
159
162
|
```
|
160
163
|
|
164
|
+
If you want to persist your data, you can mount a directory to the container:
|
165
|
+
|
166
|
+
```bash
|
167
|
+
docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs -v /c/maps4fs:/usr/src/app/mfsrootdir iwatkot/maps4fs
|
168
|
+
```
|
169
|
+
|
170
|
+
Learn more in the [My Maps](docs/my_maps.md) documentation.
|
171
|
+
|
161
172
|
And open [http://localhost:8501](http://localhost:8501) in your browser.<br>
|
162
173
|
If you don't know how to use Docker, navigate to the [Docker version](#option-2-docker-version), it's really simple.<br>
|
163
174
|
Check out the [Docker FAQ](docs/FAQ_docker.md) if you have any questions.<br>
|
@@ -212,8 +223,8 @@ Don't know where to start? Don't worry, just follow this [step-by-step guide](do
|
|
212
223
|
🛠️ Don't need to install anything.
|
213
224
|
🗺️ Supported map sizes: 2x2, 4x4.
|
214
225
|
✂️ Map scaling: not supported.
|
215
|
-
⚙️ Advanced settings:
|
216
|
-
🖼️ Texture dissolving:
|
226
|
+
⚙️ Advanced settings: partial.
|
227
|
+
🖼️ Texture dissolving: disabled.
|
217
228
|
Using the public version on [maps4fs.xyz](https://maps4fs.xyz) is the easiest way to generate a map template. Just open the link and follow the instructions.
|
218
229
|
Note: due to CPU and RAM limitations of the hosting, the generation may take some time. If you need faster processing, use the [Docker version](#option-2-docker-version).<br>
|
219
230
|
|
@@ -240,6 +251,12 @@ You can launch the project with minimalistic UI in your browser using Docker. Fo
|
|
240
251
|
docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs iwatkot/maps4fs
|
241
252
|
```
|
242
253
|
|
254
|
+
If you want to persist your data, you can mount a directory to the container:
|
255
|
+
|
256
|
+
```bash
|
257
|
+
docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs -v /c/maps4fs:/usr/src/app/mfsrootdir iwatkot/maps4fs
|
258
|
+
```
|
259
|
+
|
243
260
|
3. Open your browser and go to [http://localhost:8501](http://localhost:8501).
|
244
261
|
4. Fill in the required fields and click on the `Generate` button.
|
245
262
|
5. When the map is generated click on the `Download` button to get the map.
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "maps4fs"
|
7
|
-
version = "2.2.
|
7
|
+
version = "2.2.2"
|
8
8
|
description = "Generate map templates for Farming Simulator from real places."
|
9
9
|
authors = [{name = "iwatkot", email = "iwatkot@gmail.com"}]
|
10
10
|
license = {text = "Apache License 2.0"}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|