Text-based tile info now split into single files for performance reasons. This seems to have fixed image generation issue. Updated a landuse:meadow texture. Public release imminent.
16
layergen.py
@ -63,7 +63,7 @@ class mstr_layergen:
|
||||
|
||||
# Tile info object
|
||||
def open_tile_info(self):
|
||||
self._tileinfo = mstr_tileinfo(self._latitude, self._longitude, self._latlngfld)
|
||||
self._tileinfo = mstr_tileinfo(self._latitude, self._longitude, self._lat_number, self._lng_number, self._latlngfld)
|
||||
|
||||
# This generates a "border" image, for example farmland usually has a small space of grass
|
||||
# before the actual crop of farm field itself. This generates this "border" layer,
|
||||
@ -123,7 +123,6 @@ class mstr_layergen:
|
||||
mstr_msg("layergen", "Layer to be generated: " + str(self._latitude) + "-" + str(self._lat_number) + ":" + str(self._longitude) + "-" + str(self._lng_number) + " -- tag: " + self._tag + " - value: " + self._value )
|
||||
|
||||
# Before we generate the layer, let's check for airports in this chunk
|
||||
"""
|
||||
mstr_msg("layergen", "Checking for airport/s with ICAO code")
|
||||
osmxml = mstr_osmxml(0,0)
|
||||
icao = osmxml.find_icao_codes(mstr_datafolder + "_cache/tile.xml")
|
||||
@ -132,14 +131,13 @@ class mstr_layergen:
|
||||
rw_surface = ""
|
||||
# If we find an airport, make a note ...
|
||||
if len(icao) >= 1:
|
||||
for i in icao:
|
||||
#for i in icao:
|
||||
# ... but only, if this airport is not already noted
|
||||
iccheck = self._tiledb.perform_query("SELECT * FROM airports WHERE icao='" + i +"';")
|
||||
if len(iccheck) == 0:
|
||||
self._tiledb.insert_icao(i, self._lat_number, self._lng_number, self._latitude, self._longitude)
|
||||
mstr_msg("layergen", "Airport/s noted in data file")
|
||||
#iccheck = self._tiledb.perform_query("SELECT * FROM airports WHERE icao='" + i +"';")
|
||||
#if len(iccheck) == 0:
|
||||
#self._tiledb.insert_icao(i, self._lat_number, self._lng_number, self._latitude, self._longitude)
|
||||
# mstr_msg("layergen", "Airport/s noted in data file")
|
||||
rw_surface = osmxml.find_runway_surface(mstr_datafolder + "_cache/tile.xml")
|
||||
"""
|
||||
|
||||
# The image for the layer itself
|
||||
layer = Image.new("RGBA", (self._imgsize, self._imgsize))
|
||||
@ -404,7 +402,7 @@ class mstr_layergen:
|
||||
|
||||
# Here we need to do some magic to make some features look more natural
|
||||
if (self._tag == "landuse" and self._value == "meadow") or (self._tag == "natural" and self._value == "grassland") or (self._tag == "natural" and self._value == "heath"):
|
||||
amt = randrange(1,5)
|
||||
amt = randrange(1,16)
|
||||
for i in range(1, amt+1):
|
||||
ptc = randrange(1, 14)
|
||||
img = Image.open(mstr_datafolder + "textures/tile/completion/p" + str(ptc)+".png")
|
||||
|
BIN
textures/amenities/parking/brd/b1.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
textures/amenities/parking/ptc/b1_p1.png
Normal file
After Width: | Height: | Size: 1.4 MiB |
BIN
textures/building/area/p1.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
textures/building/area/p10.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
textures/building/area/p2.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
textures/building/area/p3.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
textures/building/area/p4.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
textures/building/area/p5.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
textures/building/area/p6.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
textures/building/area/p7.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
textures/building/area/p8.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
textures/building/area/p9.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
textures/landuse/farmland/brd/b1.png
Normal file
After Width: | Height: | Size: 2.7 MiB |
BIN
textures/landuse/farmland/brd/b10.png
Normal file
After Width: | Height: | Size: 2.2 MiB |
BIN
textures/landuse/farmland/brd/b11.png
Normal file
After Width: | Height: | Size: 2.3 MiB |
BIN
textures/landuse/farmland/brd/b12.png
Normal file
After Width: | Height: | Size: 2.2 MiB |
BIN
textures/landuse/farmland/brd/b13.png
Normal file
After Width: | Height: | Size: 3.4 MiB |
BIN
textures/landuse/farmland/brd/b14.png
Normal file
After Width: | Height: | Size: 2.1 MiB |
BIN
textures/landuse/farmland/brd/b15.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
textures/landuse/farmland/brd/b16.png
Normal file
After Width: | Height: | Size: 2.2 MiB |
BIN
textures/landuse/farmland/brd/b2.png
Normal file
After Width: | Height: | Size: 3.1 MiB |
BIN
textures/landuse/farmland/brd/b3.png
Normal file
After Width: | Height: | Size: 2.8 MiB |
BIN
textures/landuse/farmland/brd/b4.png
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
textures/landuse/farmland/brd/b5.png
Normal file
After Width: | Height: | Size: 2.4 MiB |
BIN
textures/landuse/farmland/brd/b6.png
Normal file
After Width: | Height: | Size: 1.9 MiB |
BIN
textures/landuse/farmland/brd/b7.png
Normal file
After Width: | Height: | Size: 2.2 MiB |
BIN
textures/landuse/farmland/brd/b8.png
Normal file
After Width: | Height: | Size: 2.3 MiB |
BIN
textures/landuse/farmland/brd/b9.png
Normal file
After Width: | Height: | Size: 2.7 MiB |
BIN
textures/landuse/farmland/ptc/b10_p1.png
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
textures/landuse/farmland/ptc/b10_p2.png
Normal file
After Width: | Height: | Size: 828 KiB |
BIN
textures/landuse/farmland/ptc/b11_p1.png
Normal file
After Width: | Height: | Size: 978 KiB |
BIN
textures/landuse/farmland/ptc/b11_p2.png
Normal file
After Width: | Height: | Size: 1.1 MiB |
BIN
textures/landuse/farmland/ptc/b12_p1.png
Normal file
After Width: | Height: | Size: 922 KiB |
BIN
textures/landuse/farmland/ptc/b12_p2.png
Normal file
After Width: | Height: | Size: 877 KiB |
BIN
textures/landuse/farmland/ptc/b13_p1.png
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
textures/landuse/farmland/ptc/b13_p2.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
textures/landuse/farmland/ptc/b14_p1.png
Normal file
After Width: | Height: | Size: 859 KiB |
BIN
textures/landuse/farmland/ptc/b14_p2.png
Normal file
After Width: | Height: | Size: 911 KiB |
BIN
textures/landuse/farmland/ptc/b15_p1.png
Normal file
After Width: | Height: | Size: 668 KiB |
BIN
textures/landuse/farmland/ptc/b15_p2.png
Normal file
After Width: | Height: | Size: 718 KiB |
BIN
textures/landuse/farmland/ptc/b16_p1.png
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
textures/landuse/farmland/ptc/b16_p2.png
Normal file
After Width: | Height: | Size: 1.4 MiB |
BIN
textures/landuse/farmland/ptc/b1_p1.png
Normal file
After Width: | Height: | Size: 1.8 MiB |
BIN
textures/landuse/farmland/ptc/b1_p2.png
Normal file
After Width: | Height: | Size: 2.1 MiB |
BIN
textures/landuse/farmland/ptc/b2_p1.png
Normal file
After Width: | Height: | Size: 2.7 MiB |
BIN
textures/landuse/farmland/ptc/b2_p2.png
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
textures/landuse/farmland/ptc/b3_p1.png
Normal file
After Width: | Height: | Size: 2.2 MiB |
BIN
textures/landuse/farmland/ptc/b3_p2.png
Normal file
After Width: | Height: | Size: 2.2 MiB |
BIN
textures/landuse/farmland/ptc/b4_p1.png
Normal file
After Width: | Height: | Size: 1.4 MiB |
BIN
textures/landuse/farmland/ptc/b4_p2.png
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
textures/landuse/farmland/ptc/b5_p1.png
Normal file
After Width: | Height: | Size: 1.8 MiB |
BIN
textures/landuse/farmland/ptc/b5_p2.png
Normal file
After Width: | Height: | Size: 2.0 MiB |
BIN
textures/landuse/farmland/ptc/b6_p1.png
Normal file
After Width: | Height: | Size: 999 KiB |
BIN
textures/landuse/farmland/ptc/b6_p2.png
Normal file
After Width: | Height: | Size: 866 KiB |
BIN
textures/landuse/farmland/ptc/b7_p1.png
Normal file
After Width: | Height: | Size: 1.0 MiB |
BIN
textures/landuse/farmland/ptc/b7_p2.png
Normal file
After Width: | Height: | Size: 969 KiB |
BIN
textures/landuse/farmland/ptc/b8_p1.png
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
textures/landuse/farmland/ptc/b8_p2.png
Normal file
After Width: | Height: | Size: 1.1 MiB |
BIN
textures/landuse/farmland/ptc/b9_p1.png
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
textures/landuse/farmland/ptc/b9_p2.png
Normal file
After Width: | Height: | Size: 978 KiB |
BIN
textures/landuse/forest/_backup/p1.png
Normal file
After Width: | Height: | Size: 220 KiB |
BIN
textures/landuse/forest/_backup/p10.png
Normal file
After Width: | Height: | Size: 106 KiB |
BIN
textures/landuse/forest/_backup/p11.png
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
textures/landuse/forest/_backup/p12.png
Normal file
After Width: | Height: | Size: 496 KiB |
BIN
textures/landuse/forest/_backup/p13.png
Normal file
After Width: | Height: | Size: 103 KiB |
BIN
textures/landuse/forest/_backup/p14.png
Normal file
After Width: | Height: | Size: 220 KiB |
BIN
textures/landuse/forest/_backup/p15.png
Normal file
After Width: | Height: | Size: 271 KiB |
BIN
textures/landuse/forest/_backup/p16.png
Normal file
After Width: | Height: | Size: 94 KiB |
BIN
textures/landuse/forest/_backup/p17.png
Normal file
After Width: | Height: | Size: 178 KiB |
BIN
textures/landuse/forest/_backup/p18.png
Normal file
After Width: | Height: | Size: 320 KiB |
BIN
textures/landuse/forest/_backup/p19.png
Normal file
After Width: | Height: | Size: 241 KiB |
BIN
textures/landuse/forest/_backup/p2.png
Normal file
After Width: | Height: | Size: 210 KiB |
BIN
textures/landuse/forest/_backup/p20.png
Normal file
After Width: | Height: | Size: 86 KiB |
BIN
textures/landuse/forest/_backup/p3.png
Normal file
After Width: | Height: | Size: 131 KiB |
BIN
textures/landuse/forest/_backup/p4.png
Normal file
After Width: | Height: | Size: 95 KiB |
BIN
textures/landuse/forest/_backup/p5.png
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
textures/landuse/forest/_backup/p6.png
Normal file
After Width: | Height: | Size: 186 KiB |
BIN
textures/landuse/forest/_backup/p7.png
Normal file
After Width: | Height: | Size: 188 KiB |
BIN
textures/landuse/forest/_backup/p8.png
Normal file
After Width: | Height: | Size: 477 KiB |
BIN
textures/landuse/forest/_backup/p9.png
Normal file
After Width: | Height: | Size: 322 KiB |
BIN
textures/landuse/forest/brd/b1.png
Normal file
After Width: | Height: | Size: 3.8 MiB |
BIN
textures/landuse/forest/brd/b10.png
Normal file
After Width: | Height: | Size: 3.9 MiB |
BIN
textures/landuse/forest/brd/b11.png
Normal file
After Width: | Height: | Size: 3.4 MiB |
BIN
textures/landuse/forest/brd/b12.png
Normal file
After Width: | Height: | Size: 3.4 MiB |
BIN
textures/landuse/forest/brd/b13.png
Normal file
After Width: | Height: | Size: 4.0 MiB |
BIN
textures/landuse/forest/brd/b14.png
Normal file
After Width: | Height: | Size: 3.6 MiB |
BIN
textures/landuse/forest/brd/b15.png
Normal file
After Width: | Height: | Size: 4.1 MiB |
BIN
textures/landuse/forest/brd/b2.png
Normal file
After Width: | Height: | Size: 3.6 MiB |
BIN
textures/landuse/forest/brd/b3.png
Normal file
After Width: | Height: | Size: 3.9 MiB |
BIN
textures/landuse/forest/brd/b4.png
Normal file
After Width: | Height: | Size: 3.8 MiB |
BIN
textures/landuse/forest/brd/b5.png
Normal file
After Width: | Height: | Size: 4.2 MiB |
BIN
textures/landuse/forest/brd/b6.png
Normal file
After Width: | Height: | Size: 3.3 MiB |
BIN
textures/landuse/forest/brd/b7.png
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
textures/landuse/forest/brd/b8.png
Normal file
After Width: | Height: | Size: 3.3 MiB |
BIN
textures/landuse/forest/brd/b9.png
Normal file
After Width: | Height: | Size: 3.6 MiB |
BIN
textures/landuse/forest/ptc/b10_p1.png
Normal file
After Width: | Height: | Size: 1.1 MiB |
BIN
textures/landuse/forest/ptc/b11_p1.png
Normal file
After Width: | Height: | Size: 1.8 MiB |
BIN
textures/landuse/forest/ptc/b12_p1.png
Normal file
After Width: | Height: | Size: 2.1 MiB |
BIN
textures/landuse/forest/ptc/b13_p1.png
Normal file
After Width: | Height: | Size: 1.8 MiB |