]> marstr Code Repo - orthographic/commitdiff
Further fine-tuning to layering and completion generation ahead of release
authorMarcus Str. <marcus@marstr.online>
Sat, 5 Oct 2024 07:45:04 +0000 (09:45 +0200)
committerMarcus Str. <marcus@marstr.online>
Sat, 5 Oct 2024 07:45:04 +0000 (09:45 +0200)
defines.py
layergen.py
photogen.py

index 838c94f518f603c1c20c4a9929e2eeb095f41043..cd26ea9d3a0abb3a52fa163feb83dddd1550c75f 100644 (file)
@@ -121,9 +121,6 @@ mstr_ortho_layers = [
     # Z-Order 0\r
     ("boundary", "administrative", "admin_level", ["8", "9", "10", "12"], "landuse", "residential-boundary"),\r
     # Z-Order 1\r
-    ("landuse", "grass", "landuse", "grass"),\r
-    ("landuse", "cemetery", "landuse", "grass"),\r
-    ("landuse", "greenfield", "landuse", "grass"),\r
     ("landuse", "orchard", "landuse", "meadow"),\r
     ("landuse", "meadow", "landuse", "meadow"),\r
     ("landuse", "recreation_ground", "landuse", "meadow"),\r
@@ -201,7 +198,10 @@ mstr_ortho_layers = [
     ("building", "yes", "building", "common"),\r
     ("place", "sea", "natural", "sea"),\r
     ("place", "ocean", "natural", "sea"),\r
-    ("landuse", "residential", "landuse", "residential-boundary")\r
+    ("landuse", "residential", "landuse", "residential-boundary"),\r
+    ("landuse", "grass", "landuse", "grass"),\r
+    ("landuse", "cemetery", "landuse", "grass"),\r
+    ("landuse", "greenfield", "landuse", "grass")\r
 ]\r
 \r
 \r
index 2bb5f137ebfcc48b236baae9a1a884bc122b1ccf..d541df3ac56797cde88e775f5f8f18fcd728931b 100644 (file)
@@ -445,7 +445,7 @@ class mstr_layergen:
                         for y in range(img.height):\r
                             for x in range(img.width):\r
                                 c = imgp[x,y]\r
-                                nc = (c[0], c[1], c[2], int(imgp[x,y][3]*0.25))\r
+                                nc = (c[0], c[1], c[2], int(imgp[x,y][3]*0.5))\r
                                 imgp[x,y] = nc\r
                         lx = randrange( self._imgsize - img.width ) \r
                         ly = randrange( self._imgsize - img.height )\r
index fe2b2bbf242fe1375c29de09d797dc6ba6c3bebe..825fd76d83c9524903944d68aafe8ab446382998 100644 (file)
@@ -113,11 +113,8 @@ class mstr_photogen:
         # aforementioned fix:\r
         if emptyspace == True:\r
             # Choose a suitable layer type\r
-            lt = [6,14,17]\r
-            pick = randrange(0,len(lt)-1)\r
-            ltp = lt[pick]\r
-            tag   = mstr_ortho_layers[ltp][0]\r
-            value = mstr_ortho_layers[ltp][1]\r
+            tag   = "landuse"\r
+            value = "meadow"\r
 \r
             mstr_msg("photogen", "Patching empty space")\r
             self.buildCompletionMask()\r