maps4fs 2.2.72__py3-none-any.whl → 2.2.73__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/config.py +2 -2
- {maps4fs-2.2.72.dist-info → maps4fs-2.2.73.dist-info}/METADATA +26 -144
- {maps4fs-2.2.72.dist-info → maps4fs-2.2.73.dist-info}/RECORD +6 -6
- {maps4fs-2.2.72.dist-info → maps4fs-2.2.73.dist-info}/WHEEL +0 -0
- {maps4fs-2.2.72.dist-info → maps4fs-2.2.73.dist-info}/licenses/LICENSE.md +0 -0
- {maps4fs-2.2.72.dist-info → maps4fs-2.2.73.dist-info}/top_level.txt +0 -0
maps4fs/generator/config.py
CHANGED
@@ -11,7 +11,7 @@ from maps4fs.logger import Logger
|
|
11
11
|
|
12
12
|
logger = Logger()
|
13
13
|
|
14
|
-
MFS_TEMPLATES_DIR = os.path.join(os.getcwd(), "
|
14
|
+
MFS_TEMPLATES_DIR = os.path.join(os.getcwd(), "templates")
|
15
15
|
|
16
16
|
|
17
17
|
def ensure_templates():
|
@@ -102,7 +102,7 @@ ensure_templates()
|
|
102
102
|
|
103
103
|
MFS_ROOT_DIR = os.getenv("MFS_ROOT_DIRECTORY", os.path.join(os.getcwd(), "mfsrootdir"))
|
104
104
|
MFS_CACHE_DIR = os.path.join(MFS_ROOT_DIR, "cache")
|
105
|
-
MFS_DATA_DIR = os.path.join(MFS_ROOT_DIR, "
|
105
|
+
MFS_DATA_DIR = os.path.join(MFS_ROOT_DIR, "maps")
|
106
106
|
os.makedirs(MFS_CACHE_DIR, exist_ok=True)
|
107
107
|
os.makedirs(MFS_DATA_DIR, exist_ok=True)
|
108
108
|
logger.info(
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: maps4fs
|
3
|
-
Version: 2.2.
|
3
|
+
Version: 2.2.73
|
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
|
@@ -52,7 +52,6 @@ Dynamic: license-file
|
|
52
52
|
<a href="#Overview">Overview</a> •
|
53
53
|
<a href="docs/step_by_step.md">Create a map in 10 steps</a> •
|
54
54
|
<a href="docs/recommendations.md">Practical recommendations</a> •
|
55
|
-
<a href="#How-To-Run">How-To-Run</a><br>
|
56
55
|
<a href="docs/my_maps.md">My Maps</a> •
|
57
56
|
<a href="docs/FAQ.md">FAQ</a> •
|
58
57
|
<a href="docs/map_structure.md">Map Structure</a> •
|
@@ -149,38 +148,49 @@ There are several ways to use the tool. You obviously need the **first one**, bu
|
|
149
148
|
### 🚜 For most users
|
150
149
|
|
151
150
|
**Option 1:** Open the [maps4fs](https://maps4fs.xyz) and generate a map template in a few clicks.<br>
|
151
|
+
🟢 Recommended for all users.
|
152
|
+
🛠️ Don't need to install anything.
|
153
|
+
🗺️ Supported map sizes: 2x2, 4x4, custom sizes not available.
|
154
|
+
✂️ Map scaling: not supported.
|
155
|
+
⚙️ Advanced settings: some settings not available.
|
152
156
|
|
153
157
|

|
154
158
|
|
155
159
|
### 😎 For advanced users
|
156
160
|
|
157
|
-
**Option 2:** Run the Docker version in your browser.
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
161
|
+
**Option 2:** Run the Docker version in your browser.
|
162
|
+
🟠 Recommended for users who want bigger maps, fast generation, nice-looking textures, and advanced settings.
|
163
|
+
🛠️ Docker installation required, launch with one command.
|
164
|
+
🗺️ Supported map sizes: 2x2, 4x4, 8x8, 16x16 km and any custom size.
|
165
|
+
✂️ Map scaling: supported.
|
166
|
+
⚙️ Advanced settings: all settings available.
|
162
167
|
|
163
|
-
|
168
|
+
Launch the following command in your terminal to use the Setup Wizard:
|
164
169
|
|
165
|
-
```
|
166
|
-
|
170
|
+
```powershell
|
171
|
+
powershell -ExecutionPolicy Bypass -Command "iex (iwr 'https://raw.githubusercontent.com/iwatkot/maps4fs/main/setup-wizard.ps1' -UseBasicParsing).Content"
|
167
172
|
```
|
168
173
|
|
169
|
-
|
174
|
+
ℹ️ Check out detailed instructions about [local deployment](docs/local_deployment.md).
|
170
175
|
|
171
|
-
And open [http://localhost:8501](http://localhost:8501) in your browser.<br>
|
172
|
-
If you don't know how to use Docker, navigate to the [Docker version](#option-2-docker-version), it's really simple.<br>
|
173
|
-
Check out the [Docker FAQ](docs/FAQ_docker.md) if you have any questions.<br>
|
174
176
|
|
175
177
|
### 🤯 For developers
|
176
178
|
|
177
|
-
**Option 3:** Python package
|
179
|
+
**Option 3:** Python package or run from source code.
|
180
|
+
🔴 Recommended for developers who want full control over the generation process and fastest performance.
|
181
|
+
🛠️ Requires Python, pip, and Git.
|
182
|
+
🗺️ Supported map sizes: 2x2, 4x4, 8x8, 16x16 km and any custom size.
|
183
|
+
✂️ Map scaling: supported.
|
184
|
+
⚙️ Advanced settings: all settings available.
|
185
|
+
|
186
|
+
Install the package using the following command:
|
178
187
|
|
179
188
|
```bash
|
180
189
|
pip install maps4fs
|
181
190
|
```
|
182
191
|
|
183
|
-
|
192
|
+
ℹ️ Check out detailed instructions about [Maps4FS Python Package Deployment](docs/local_deployment_source.md).
|
193
|
+
|
184
194
|
|
185
195
|
## Overview
|
186
196
|
|
@@ -214,134 +224,6 @@ Parameters:
|
|
214
224
|
|
215
225
|
Don't know where to start? Don't worry, just follow this [step-by-step guide](docs/step_by_step.md) to create your first map in 10 simple steps.<br>
|
216
226
|
|
217
|
-
## How-To-Run
|
218
|
-
|
219
|
-
### Option 1: Public version
|
220
|
-
|
221
|
-
🟢 Recommended for all users.
|
222
|
-
🛠️ Don't need to install anything.
|
223
|
-
🗺️ Supported map sizes: 2x2, 4x4.
|
224
|
-
✂️ Map scaling: not supported.
|
225
|
-
⚙️ Advanced settings: partial.
|
226
|
-
🖼️ Texture dissolving: disabled.
|
227
|
-
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.
|
228
|
-
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>
|
229
|
-
|
230
|
-
Using it is easy and doesn't require any guides. Enjoy!
|
231
|
-
|
232
|
-
### Option 2: Docker version
|
233
|
-
|
234
|
-
🟠 Recommended for users who want bigger maps, fast generation, nice-looking textures, and advanced settings.
|
235
|
-
🛠️ Launch with one single command.
|
236
|
-
🗺️ Supported map sizes: 2x2, 4x4, 8x8, 16x16 km and any custom size.
|
237
|
-
✂️ Map scaling: supported.
|
238
|
-
⚙️ Advanced settings: enabled.
|
239
|
-
🖼️ Texture dissolving: enabled.
|
240
|
-
Check out the [Docker FAQ](docs/FAQ_docker.md) if you have any questions.<br>
|
241
|
-
|
242
|
-
📹 Check out the [video tutorial](https://www.youtube.com/watch?v=1AHGIxTxSBM) on how to install Docker and use the Docker version.
|
243
|
-
|
244
|
-
You can launch the project with minimalistic UI in your browser using Docker. Follow these steps:
|
245
|
-
|
246
|
-
1. Install [Docker](https://docs.docker.com/get-docker/) for your OS.
|
247
|
-
2. Run the following command in your terminal:
|
248
|
-
|
249
|
-
```bash
|
250
|
-
docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs iwatkot/maps4fs
|
251
|
-
```
|
252
|
-
|
253
|
-
If you want to persist your data, you can mount a directory to the container:
|
254
|
-
|
255
|
-
```bash
|
256
|
-
docker run -d -p 8501:8501 -p 8000:8000 --name maps4fs -v /c/maps4fs:/usr/src/app/mfsrootdir iwatkot/maps4fs
|
257
|
-
```
|
258
|
-
|
259
|
-
3. Open your browser and go to [http://localhost:8501](http://localhost:8501).
|
260
|
-
4. Fill in the required fields and click on the `Generate` button.
|
261
|
-
5. When the map is generated click on the `Download` button to get the map.
|
262
|
-
|
263
|
-
### Option 3: Python package or source code
|
264
|
-
|
265
|
-
🔴 Recommended for developers.
|
266
|
-
🗺️ Supported map sizes: 2x2, 4x4, 8x8, 16x16 km and any custom size.
|
267
|
-
✂️ Map scaling: supported.
|
268
|
-
⚙️ Advanced settings: enabled.
|
269
|
-
🖼️ Texture dissolving: enabled.
|
270
|
-
You can use the Python package to generate maps. Follow these steps:
|
271
|
-
|
272
|
-
1. Install the package from PyPI:
|
273
|
-
|
274
|
-
```bash
|
275
|
-
pip install maps4fs
|
276
|
-
```
|
277
|
-
|
278
|
-
Or clone the repository and install the package from the source code:
|
279
|
-
|
280
|
-
```bash
|
281
|
-
git clone https://github.com/iwatkot/maps4fs.git
|
282
|
-
cd maps4fs
|
283
|
-
dev/create_venv.ps1 # for Windows
|
284
|
-
sh dev/create_venv.sh # for Linux
|
285
|
-
|
286
|
-
# Activate the virtual environment.
|
287
|
-
./venv/scripts/activate # for Windows
|
288
|
-
source venv/bin/activate # for Linux
|
289
|
-
|
290
|
-
# Edit the demo.py file to set the parameters.
|
291
|
-
python demo.py
|
292
|
-
```
|
293
|
-
|
294
|
-
2. Import the Game class and create an instance of it:
|
295
|
-
|
296
|
-
```python
|
297
|
-
import maps4fs as mfs
|
298
|
-
|
299
|
-
game_code = "fs25"
|
300
|
-
game = mfs.Game.from_code(game_code)
|
301
|
-
|
302
|
-
dtm_provider = mfs.dtm.SRTM30Provider
|
303
|
-
|
304
|
-
lat, lon = 45.28, 20.23
|
305
|
-
coordinates = (lat, lon)
|
306
|
-
size = 2048
|
307
|
-
rotation = 25
|
308
|
-
|
309
|
-
map_directory = "map_directory"
|
310
|
-
os.makedirs(map_directory, exist_ok=True)
|
311
|
-
|
312
|
-
mp = mfs.Map(
|
313
|
-
game,
|
314
|
-
dtm_provider,
|
315
|
-
None,
|
316
|
-
coordinates,
|
317
|
-
size,
|
318
|
-
rotation,
|
319
|
-
map_directory,
|
320
|
-
)
|
321
|
-
```
|
322
|
-
|
323
|
-
In this case, the library will use the default templates, which should be present in the `data` directory, which should be placed in the current working directory.<br>
|
324
|
-
Structure example:<br>
|
325
|
-
|
326
|
-
```text
|
327
|
-
📁 data
|
328
|
-
┣ 📄 fs22-map-template.zip
|
329
|
-
┗ 📄 fs22-texture-schema.json
|
330
|
-
```
|
331
|
-
|
332
|
-
So it's recommended to download the `data` directory from the repository and place it in the root of your project.<br>
|
333
|
-
|
334
|
-
3. Launch the generation process.
|
335
|
-
The `generate` method returns a generator, which yields the active component of the map. You can use it to track the progress of the generation process.
|
336
|
-
|
337
|
-
```python
|
338
|
-
for component_name in mp.generate():
|
339
|
-
print(f"Generating {component_name}...")
|
340
|
-
```
|
341
|
-
|
342
|
-
The map will be saved in the `map_directory` directory.
|
343
|
-
|
344
|
-
➡️ Check out the [demo.py](demo.py) file for a complete example.
|
345
227
|
|
346
228
|
## Schemas Editor
|
347
229
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
maps4fs/__init__.py,sha256=5ixsCA5vgcIV0OrF9EJBm91Mmc_KfMiDRM-QyifMAvo,386
|
2
2
|
maps4fs/logger.py,sha256=6sem0aFKQqtVjQ_yNu9iGcc-hqzLQUhfxco05K6nqow,763
|
3
3
|
maps4fs/generator/__init__.py,sha256=zZMLEkGzb4z0xql650gOtGSvcgX58DnJ2yN3vC2daRk,43
|
4
|
-
maps4fs/generator/config.py,sha256=
|
4
|
+
maps4fs/generator/config.py,sha256=WcqXqjUNZ2d23cM45c-dR8omcn-HorEcDSnHyJVWMQs,5494
|
5
5
|
maps4fs/generator/game.py,sha256=nf6iuYNA5NJc-ir_WOgkw-MdJVgetVHeEtxbWJYt3Vo,14462
|
6
6
|
maps4fs/generator/map.py,sha256=5at6Dlk1nk2dGr46rjjuQvq4hUNpbvchIoc8ahrKNag,12723
|
7
7
|
maps4fs/generator/qgis.py,sha256=Es8hLuqN_KH8lDfnJE6He2rWYbAKJ3RGPn-o87S6CPI,6116
|
@@ -22,8 +22,8 @@ maps4fs/generator/component/base/component.py,sha256=lf0V9CLUXMg88Nm2yI3rP5taVYY
|
|
22
22
|
maps4fs/generator/component/base/component_image.py,sha256=WTGC6v1KuS5sLNCC95Z48nCspvATKKNOuhTNYzTWXr4,8315
|
23
23
|
maps4fs/generator/component/base/component_mesh.py,sha256=3hC-qDT8Vde6SmRMqs9USAkrF-gL2dDTYW71ATpxUS4,9130
|
24
24
|
maps4fs/generator/component/base/component_xml.py,sha256=MT-VhU2dEckLFxAgmxg6V3gnv11di_94Qq6atfpOLdc,5342
|
25
|
-
maps4fs-2.2.
|
26
|
-
maps4fs-2.2.
|
27
|
-
maps4fs-2.2.
|
28
|
-
maps4fs-2.2.
|
29
|
-
maps4fs-2.2.
|
25
|
+
maps4fs-2.2.73.dist-info/licenses/LICENSE.md,sha256=pTKD_oUexcn-yccFCTrMeLkZy0ifLRa-VNcDLqLZaIw,10749
|
26
|
+
maps4fs-2.2.73.dist-info/METADATA,sha256=N8abyZ0VJp40XDhwIaBpuUwHJmi9AFtIN4MlttuM0so,42745
|
27
|
+
maps4fs-2.2.73.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
28
|
+
maps4fs-2.2.73.dist-info/top_level.txt,sha256=Ue9DSRlejRQRCaJueB0uLcKrWwsEq9zezfv5dI5mV1M,8
|
29
|
+
maps4fs-2.2.73.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|