maps4fs 1.3.6__py3-none-any.whl → 1.3.7__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/map.py CHANGED
@@ -79,7 +79,7 @@ class TextureSettings(NamedTuple):
79
79
  skip_drains: bool = False
80
80
 
81
81
 
82
- # pylint: disable=R0913, R0902
82
+ # pylint: disable=R0913, R0902, R0914
83
83
  class Map:
84
84
  """Class used to generate map using all components.
85
85
 
@@ -99,6 +99,7 @@ class Map:
99
99
  rotation: int,
100
100
  map_directory: str,
101
101
  logger: Any = None,
102
+ custom_osm: str | None = None,
102
103
  dem_settings: DEMSettings = DEMSettings(),
103
104
  background_settings: BackgroundSettings = BackgroundSettings(),
104
105
  grle_settings: GRLESettings = GRLESettings(),
@@ -126,6 +127,9 @@ class Map:
126
127
 
127
128
  self.logger.info("Game was set to %s", game.code)
128
129
 
130
+ self.custom_osm = custom_osm
131
+ self.logger.info("Custom OSM file: %s", custom_osm)
132
+
129
133
  self.dem_settings = dem_settings
130
134
  self.logger.info("DEM settings: %s", dem_settings)
131
135
  self.background_settings = background_settings
@@ -635,7 +635,10 @@ class Texture(Component):
635
635
  """
636
636
  is_fieds = info_layer == "fields"
637
637
  try:
638
- objects = ox.features_from_bbox(bbox=self.new_bbox, tags=tags)
638
+ if self.map.custom_osm is not None:
639
+ objects = ox.features_from_xml(self.map.custom_osm, tags=tags)
640
+ else:
641
+ objects = ox.features_from_bbox(bbox=self.new_bbox, tags=tags)
639
642
  except Exception: # pylint: disable=W0718
640
643
  self.logger.debug("Error fetching objects for tags: %s.", tags)
641
644
  return
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: maps4fs
3
- Version: 1.3.6
3
+ Version: 1.3.7
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
@@ -72,6 +72,7 @@ Requires-Dist: pympler
72
72
  🌲 Automatically generates forests 🆕<br>
73
73
  🌊 Automatically generates water planes 🆕<br>
74
74
  🌍 Based on real-world data from OpenStreetMap<br>
75
+ 🗺️ Supports [custom OSM maps](/docs/custom_osm.md)<br>
75
76
  🏞️ Generates height map using SRTM dataset<br>
76
77
  📦 Provides a ready-to-use map template for the Giants Editor<br>
77
78
  🚜 Supports Farming Simulator 22 and 25<br>
@@ -528,3 +529,4 @@ But also, I want to thank the people who helped me with the project in some way,
528
529
  - [BFernaesds](https://github.com/BFernaesds) - for the manual tests of the app.
529
530
  - [gamerdesigns](https://github.com/gamerdesigns) - for the manual tests of the app.
530
531
  - [Tox3](https://github.com/Tox3) - for the manual tests of the app.
532
+ - [Lucandia](https://github.com/Lucandia) - for the awesome StreamLit [widget to preview STL files](https://github.com/Lucandia/streamlit_stl).
@@ -8,14 +8,14 @@ maps4fs/generator/dem.py,sha256=MZf3ZjawJ977TxqB1q9nNpvPZUNwfmm2EaJDtVU-eCU,1593
8
8
  maps4fs/generator/game.py,sha256=ZQeYzPzPB3CG41avdhNCyTZpHEeedqNBuAbNevTZuXg,7931
9
9
  maps4fs/generator/grle.py,sha256=xKIpyhYsZol-IXcBULbX7wWZ1n83BWTZqaf8FLodchE,17499
10
10
  maps4fs/generator/i3d.py,sha256=bW7FLAISFKCPUmad7ANz1loWI07oEZlEQOEL_tv0YmQ,18483
11
- maps4fs/generator/map.py,sha256=a-nwDsKq6u9RLB2htueXtJtdDZbocpj_KxGhBw5AoEI,8776
11
+ maps4fs/generator/map.py,sha256=VEcsh-nvJ8kF1NevBwNS0tW5oiLP8gIF61ttz6XrOHc,8920
12
12
  maps4fs/generator/qgis.py,sha256=Es8hLuqN_KH8lDfnJE6He2rWYbAKJ3RGPn-o87S6CPI,6116
13
- maps4fs/generator/texture.py,sha256=tNhv-_AOrv4Wf7knbrN9LZBkvApgsrGffGPAzZScr7g,27745
13
+ maps4fs/generator/texture.py,sha256=PCQA2OVjTKrrMbheZ36pRAkGT8everovgvfMRwVWTFs,27894
14
14
  maps4fs/toolbox/__init__.py,sha256=zZMLEkGzb4z0xql650gOtGSvcgX58DnJ2yN3vC2daRk,43
15
15
  maps4fs/toolbox/background.py,sha256=9BXWNqs_n3HgqDiPztWylgYk_QM4YgBpe6_ZNQAWtSc,2154
16
16
  maps4fs/toolbox/dem.py,sha256=z9IPFNmYbjiigb3t02ZenI3Mo8odd19c5MZbjDEovTo,3525
17
- maps4fs-1.3.6.dist-info/LICENSE.md,sha256=pTKD_oUexcn-yccFCTrMeLkZy0ifLRa-VNcDLqLZaIw,10749
18
- maps4fs-1.3.6.dist-info/METADATA,sha256=pczjM5FWcRCAJiNtW3JRwl0SeNYEAlQUwc1V2UWyjtY,31082
19
- maps4fs-1.3.6.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
20
- maps4fs-1.3.6.dist-info/top_level.txt,sha256=Ue9DSRlejRQRCaJueB0uLcKrWwsEq9zezfv5dI5mV1M,8
21
- maps4fs-1.3.6.dist-info/RECORD,,
17
+ maps4fs-1.3.7.dist-info/LICENSE.md,sha256=pTKD_oUexcn-yccFCTrMeLkZy0ifLRa-VNcDLqLZaIw,10749
18
+ maps4fs-1.3.7.dist-info/METADATA,sha256=3yZGkkoXbOYdGYj9nANHuxY0uhT_8TNVSywkz_WhoS0,31286
19
+ maps4fs-1.3.7.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
20
+ maps4fs-1.3.7.dist-info/top_level.txt,sha256=Ue9DSRlejRQRCaJueB0uLcKrWwsEq9zezfv5dI5mV1M,8
21
+ maps4fs-1.3.7.dist-info/RECORD,,