maps4fs 1.8.13__py3-none-any.whl → 1.8.15__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.
@@ -15,6 +15,13 @@ class Parameters:
15
15
  TEXTURES = "textures"
16
16
  FOREST = "forest"
17
17
  ROADS_POLYLINES = "roads_polylines"
18
+ FARMYARDS = "farmyards"
19
+
20
+ PREVIEW_MAXIMUM_SIZE = 2048
21
+
22
+ BACKGROUND_DISTANCE = 2048
23
+ FULL = "FULL"
24
+ PREVIEW = "PREVIEW"
18
25
 
19
26
 
20
27
  class SharedSettings(BaseModel):
@@ -141,6 +148,8 @@ class GRLESettings(SettingsModel):
141
148
  farmland_margin: int = 0
142
149
  random_plants: bool = True
143
150
  add_farmyards: bool = False
151
+ base_price: int = 60000
152
+ price_scale: int = 100
144
153
  base_grass: tuple | str = ("smallDenseMix", "meadow")
145
154
  plants_island_minimum_size: int = 10
146
155
  plants_island_maximum_size: int = 200
@@ -172,6 +181,7 @@ class TextureSettings(SettingsModel):
172
181
  dissolve: bool = False
173
182
  fields_padding: int = 0
174
183
  skip_drains: bool = False
184
+ use_cache: bool = True
175
185
 
176
186
 
177
187
  class SplineSettings(SettingsModel):
@@ -12,9 +12,10 @@ from typing import Any, Callable, Generator, Optional
12
12
 
13
13
  import cv2
14
14
  import numpy as np
15
- import osmnx as ox # type: ignore
15
+ import osmnx as ox
16
16
  import pandas as pd
17
17
  import shapely.geometry # type: ignore
18
+ from osmnx import settings as ox_settings
18
19
  from shapely.geometry.base import BaseGeometry # type: ignore
19
20
  from tqdm import tqdm
20
21
 
@@ -764,6 +765,10 @@ class Texture(Component):
764
765
  Numpy array of polygon points or list of point coordinates.
765
766
  """
766
767
  is_fieds = info_layer == "fields"
768
+
769
+ ox_settings.use_cache = self.map.texture_settings.use_cache
770
+ ox_settings.requests_timeout = 30
771
+
767
772
  try:
768
773
  if self.map.custom_osm is not None:
769
774
  with warnings.catch_warnings():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: maps4fs
3
- Version: 1.8.13
3
+ Version: 1.8.15
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
@@ -595,6 +595,10 @@ You can also apply some advanced settings to the map generation process.<br>
595
595
 
596
596
  - Add Farmyards - if enabled, the tool will create farmlands from the regions that are marked as farmyards in the OSM data. Those farmlands will not have fields and also will not be drawn on textures. By default, it's turned off.
597
597
 
598
+ - Base price - the base price of the farmland. It's used to calculate the price of the farmland in the game. In default in-game maps this value equals to 60000.
599
+
600
+ - Price scale - is a value in percent which will be applied to all farmnlands. The price per Ha will be calculated as `base_price * price_scale / 100`. By default, it's set to 100%.
601
+
598
602
  - Base grass - you can select which plant will be used as a base grass on the map.
599
603
 
600
604
  - Plants island minimum size - when random plants are enabled, the generator will add islands of differents plants to the map and choose the random size of those island between the minimum and maximum values. This one is the minimum size of the island in meters.
@@ -621,6 +625,8 @@ You can also apply some advanced settings to the map generation process.<br>
621
625
 
622
626
  - Skip drains - if enabled, the tool will not generate the drains and ditches on the map. By default, it's set to False. Use this if you don't need the drains on the map.
623
627
 
628
+ - Use cache - if enabled, the tool will use the cached OSM data for generating the map. It's useful when you're generating the same map multiple times and don't want to download the OSM data each time. But if you've made some changes to the OSM data, you should disable this option to get the updated data. By default, it's set to True. This option has no effect when you're using the custom OSM file.
629
+
624
630
  ### Splines Advanced settings
625
631
 
626
632
  - Splines density - number of points, which will be added (interpolate) between each pair of existing points. The higher the value, the denser the spline will be. It can smooth the splines, but high values can in opposite make the splines look unnatural.
@@ -1,25 +1,27 @@
1
1
  maps4fs/__init__.py,sha256=j-7p1Qew6slQDJZ2zib0a9MbvhdPJ_R6ISY4Lmlvwms,909
2
2
  maps4fs/logger.py,sha256=B-NEYpMjPAAqlV4VpfTi6nbBFnEABVtQOaYe6nMpidg,1489
3
3
  maps4fs/generator/__init__.py,sha256=zZMLEkGzb4z0xql650gOtGSvcgX58DnJ2yN3vC2daRk,43
4
- maps4fs/generator/background.py,sha256=p6rciVwGXgmx7o_LoeugjqUY6JLqVdaID9vt33W9Seg,24774
5
4
  maps4fs/generator/dem.py,sha256=RsIaL3LabYnZzow2fzmccsnzBo0m1YjcVVxUkJJGJMU,10735
6
- maps4fs/generator/game.py,sha256=zpS6PDd4Nej_VgpncVBeIhEFkAAyXYAD4Pgj-b_sLbQ,9196
7
- maps4fs/generator/grle.py,sha256=5bWTTVSYHr2wKbuynYdz6IGYZFD-dlbZBErDPCZ8NQ8,20726
8
- maps4fs/generator/map.py,sha256=ataDN-Hsx3XlHdisrLBZbP7q1aKFDaSXG939MEGsiE4,11513
5
+ maps4fs/generator/game.py,sha256=YwtdzqwcBJm1FHtc1ehDd3WbfTTW_gBvxK-pzfU48zs,11015
6
+ maps4fs/generator/map.py,sha256=c5GMhr5iTRdXvTXoBKyVYa2V1tocR3ZCc7D_hpU21k8,11523
9
7
  maps4fs/generator/qgis.py,sha256=Es8hLuqN_KH8lDfnJE6He2rWYbAKJ3RGPn-o87S6CPI,6116
10
- maps4fs/generator/satellite.py,sha256=jeKZ1IC5kReewDBDIxGzQc11UaGceysyh_XAOxw6JO0,3644
11
- maps4fs/generator/settings.py,sha256=rzXOJi6d6GY7GMWZ5SYwKQoih_qcZKkYAuVwiyPMyjo,5917
12
- maps4fs/generator/texture.py,sha256=VEmbjTpv-asnQs7yo2pSjvE-jJI8zOFisnNGRbAsQVk,36432
8
+ maps4fs/generator/satellite.py,sha256=t33EfaxWTCjcKYnqoppSlFdQQSekiBe7UFmLgTVhFQI,3650
9
+ maps4fs/generator/settings.py,sha256=psZC3k95roptV6-YQMDz9ofoKw5dBNc1TZ66DEECmSc,6134
10
+ maps4fs/generator/texture.py,sha256=_IfqIuxH4934VJXKtdABHa6ToPWk3T0xknvlu-rZ5Uc,36570
13
11
  maps4fs/generator/component/__init__.py,sha256=zZMLEkGzb4z0xql650gOtGSvcgX58DnJ2yN3vC2daRk,43
12
+ maps4fs/generator/component/background.py,sha256=pN1iMXm5Xg87OWh4XFml4bVIrueTJMdwVJvS3YWm0x0,18588
14
13
  maps4fs/generator/component/config.py,sha256=RitKgFDZPzjA1fi8GcEi1na75qqaueUvpcITHjBvCXc,3674
14
+ maps4fs/generator/component/grle.py,sha256=aKMjVJNuKHJJ2gsXaH00bz10kWaIbbZXU_JbP-ZAGw4,18990
15
15
  maps4fs/generator/component/i3d.py,sha256=3x38yL-kSJ8ylBwICBb6wPYzRSky4gVj8XCk2jzYSeo,19861
16
16
  maps4fs/generator/component/base/__init__.py,sha256=zZMLEkGzb4z0xql650gOtGSvcgX58DnJ2yN3vC2daRk,43
17
17
  maps4fs/generator/component/base/component.py,sha256=U3XJae0GUvHN08psv2j24Y4PBAAytSkSK3AmD-VjjXE,21404
18
- maps4fs/generator/component/base/component_xml.py,sha256=DLSUobR0GtVCdBWOCwZ9VLJv5vY9da5l4fzp86W8QhE,3446
18
+ maps4fs/generator/component/base/component_image.py,sha256=vuiiJqsrKZgYsnK8Qa5yL2Pejqa6nJSTtXNAcBPL29c,3099
19
+ maps4fs/generator/component/base/component_mesh.py,sha256=-9kmMX5KUULAIScygcrzmq8Cg643hiZ2IfSZOKiFfRs,4634
20
+ maps4fs/generator/component/base/component_xml.py,sha256=6OO1dKoceO1ACk7-k1oGtnkfNud8ZN3u3ZNjdNMpTqw,3967
19
21
  maps4fs/generator/dtm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
22
  maps4fs/generator/dtm/bavaria.py,sha256=7njrEvSCYAC8ZVyvS-_84iXHhWA0oHKrEqSzxdnZuGs,4293
21
23
  maps4fs/generator/dtm/canada.py,sha256=lYONwm6aNX5cjVggR3AiZZF9dlCDAWg0M8RMaObog8s,1288
22
- maps4fs/generator/dtm/dtm.py,sha256=tbYPlpDbFS374ywHrYIJwRflRRzGzi7M5mmcVqwCYBw,22880
24
+ maps4fs/generator/dtm/dtm.py,sha256=Ox4uo16L8T1JdDjsceNn74gvoL_o9qX7_YZ5pLHg3Dg,22732
23
25
  maps4fs/generator/dtm/england.py,sha256=YyCYwnNUJuBeeMNUozfKIj_yNjHpGeuH1Mz0NiAJL-U,1122
24
26
  maps4fs/generator/dtm/hessen.py,sha256=dYu7TUXICaFMI1sc2l1i3ZDdM5fecXkj5jcz5ZuXIOw,964
25
27
  maps4fs/generator/dtm/niedersachsen.py,sha256=rHScUGrI8JYseBb3xeSN6mdZ7b28YgdlPVCMlluaAMM,1297
@@ -33,8 +35,8 @@ maps4fs/toolbox/__init__.py,sha256=zZMLEkGzb4z0xql650gOtGSvcgX58DnJ2yN3vC2daRk,4
33
35
  maps4fs/toolbox/background.py,sha256=ym9a6TjZpRC2ButAUaQ_rwhOEuAo2ScwUQsXdJrV_Hs,2111
34
36
  maps4fs/toolbox/custom_osm.py,sha256=X6ZlPqiOhNjkmdD_qVroIfdOl9Rb90cDwVSLDVYgx80,1892
35
37
  maps4fs/toolbox/dem.py,sha256=z9IPFNmYbjiigb3t02ZenI3Mo8odd19c5MZbjDEovTo,3525
36
- maps4fs-1.8.13.dist-info/LICENSE.md,sha256=pTKD_oUexcn-yccFCTrMeLkZy0ifLRa-VNcDLqLZaIw,10749
37
- maps4fs-1.8.13.dist-info/METADATA,sha256=1LYrpLhWYaCMzExdg4c8VvuiLH1qHKiwp0FvEGqgeCk,42156
38
- maps4fs-1.8.13.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
39
- maps4fs-1.8.13.dist-info/top_level.txt,sha256=Ue9DSRlejRQRCaJueB0uLcKrWwsEq9zezfv5dI5mV1M,8
40
- maps4fs-1.8.13.dist-info/RECORD,,
38
+ maps4fs-1.8.15.dist-info/LICENSE.md,sha256=pTKD_oUexcn-yccFCTrMeLkZy0ifLRa-VNcDLqLZaIw,10749
39
+ maps4fs-1.8.15.dist-info/METADATA,sha256=-6iRjDS-f0IxzOmA4wl0poy2VSTnB1WaFYBDnyKUIFs,42904
40
+ maps4fs-1.8.15.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
41
+ maps4fs-1.8.15.dist-info/top_level.txt,sha256=Ue9DSRlejRQRCaJueB0uLcKrWwsEq9zezfv5dI5mV1M,8
42
+ maps4fs-1.8.15.dist-info/RECORD,,