maps4fs 1.2.6__tar.gz → 1.2.8__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.

Potentially problematic release.


This version of maps4fs might be problematic. Click here for more details.

Files changed (27) hide show
  1. {maps4fs-1.2.6 → maps4fs-1.2.8}/PKG-INFO +1 -1
  2. {maps4fs-1.2.6 → maps4fs-1.2.8}/maps4fs/generator/texture.py +7 -3
  3. {maps4fs-1.2.6 → maps4fs-1.2.8}/maps4fs.egg-info/PKG-INFO +1 -1
  4. {maps4fs-1.2.6 → maps4fs-1.2.8}/pyproject.toml +1 -1
  5. {maps4fs-1.2.6 → maps4fs-1.2.8}/LICENSE.md +0 -0
  6. {maps4fs-1.2.6 → maps4fs-1.2.8}/README.md +0 -0
  7. {maps4fs-1.2.6 → maps4fs-1.2.8}/maps4fs/__init__.py +0 -0
  8. {maps4fs-1.2.6 → maps4fs-1.2.8}/maps4fs/generator/__init__.py +0 -0
  9. {maps4fs-1.2.6 → maps4fs-1.2.8}/maps4fs/generator/background.py +0 -0
  10. {maps4fs-1.2.6 → maps4fs-1.2.8}/maps4fs/generator/component.py +0 -0
  11. {maps4fs-1.2.6 → maps4fs-1.2.8}/maps4fs/generator/config.py +0 -0
  12. {maps4fs-1.2.6 → maps4fs-1.2.8}/maps4fs/generator/dem.py +0 -0
  13. {maps4fs-1.2.6 → maps4fs-1.2.8}/maps4fs/generator/game.py +0 -0
  14. {maps4fs-1.2.6 → maps4fs-1.2.8}/maps4fs/generator/grle.py +0 -0
  15. {maps4fs-1.2.6 → maps4fs-1.2.8}/maps4fs/generator/i3d.py +0 -0
  16. {maps4fs-1.2.6 → maps4fs-1.2.8}/maps4fs/generator/map.py +0 -0
  17. {maps4fs-1.2.6 → maps4fs-1.2.8}/maps4fs/generator/qgis.py +0 -0
  18. {maps4fs-1.2.6 → maps4fs-1.2.8}/maps4fs/logger.py +0 -0
  19. {maps4fs-1.2.6 → maps4fs-1.2.8}/maps4fs/toolbox/__init__.py +0 -0
  20. {maps4fs-1.2.6 → maps4fs-1.2.8}/maps4fs/toolbox/background.py +0 -0
  21. {maps4fs-1.2.6 → maps4fs-1.2.8}/maps4fs/toolbox/dem.py +0 -0
  22. {maps4fs-1.2.6 → maps4fs-1.2.8}/maps4fs.egg-info/SOURCES.txt +0 -0
  23. {maps4fs-1.2.6 → maps4fs-1.2.8}/maps4fs.egg-info/dependency_links.txt +0 -0
  24. {maps4fs-1.2.6 → maps4fs-1.2.8}/maps4fs.egg-info/requires.txt +0 -0
  25. {maps4fs-1.2.6 → maps4fs-1.2.8}/maps4fs.egg-info/top_level.txt +0 -0
  26. {maps4fs-1.2.6 → maps4fs-1.2.8}/setup.cfg +0 -0
  27. {maps4fs-1.2.6 → maps4fs-1.2.8}/tests/test_generator.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: maps4fs
3
- Version: 1.2.6
3
+ Version: 1.2.8
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
@@ -412,7 +412,7 @@ class Texture(Component):
412
412
 
413
413
  mask = cv2.bitwise_not(cumulative_image)
414
414
 
415
- for polygon in self.polygons(layer.tags, layer.width): # type: ignore
415
+ for polygon in self.polygons(layer.tags, layer.width, layer.info_layer): # type: ignore
416
416
  if layer.info_layer:
417
417
  info_layer_data[layer.info_layer].append(self.np_to_polygon_points(polygon))
418
418
  cv2.fillPoly(layer_image, [polygon], color=255) # type: ignore
@@ -621,18 +621,22 @@ class Texture(Component):
621
621
  return converters.get(geom_type) # type: ignore
622
622
 
623
623
  def polygons(
624
- self, tags: dict[str, str | list[str] | bool], width: int | None
624
+ self,
625
+ tags: dict[str, str | list[str] | bool],
626
+ width: int | None,
627
+ info_layer: str | None = None,
625
628
  ) -> Generator[np.ndarray, None, None]:
626
629
  """Generator which yields numpy arrays of polygons from OSM data.
627
630
 
628
631
  Arguments:
629
632
  tags (dict[str, str | list[str]]): Dictionary of tags to search for.
630
633
  width (int | None): Width of the polygon in meters (only for LineString).
634
+ info_layer (str | None): Name of the corresponding info layer.
631
635
 
632
636
  Yields:
633
637
  Generator[np.ndarray, None, None]: Numpy array of polygon points.
634
638
  """
635
- is_fieds = "farmland" in tags.values()
639
+ is_fieds = info_layer == "fields"
636
640
  try:
637
641
  objects = ox.features_from_bbox(bbox=self.new_bbox, tags=tags)
638
642
  except Exception as e: # pylint: disable=W0718
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: maps4fs
3
- Version: 1.2.6
3
+ Version: 1.2.8
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "maps4fs"
7
- version = "1.2.6"
7
+ version = "1.2.8"
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 = "MIT License"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes