Implemented mechanism that can continue interrupted work to continue later at some point, or to re-generate an ortho photo. Fixed layering of small rivers/streams

This commit is contained in:
marstr 2024-08-28 21:26:07 +02:00
parent c412a41291
commit 3566992860
2 changed files with 43 additions and 37 deletions

View File

@ -99,6 +99,8 @@ mstr_ortho_layers = [
("landuse", "farmyard", "landuse", "farmland"), ("landuse", "farmyard", "landuse", "farmland"),
("landuse", "military", "landuse", "residential-boundary"), ("landuse", "military", "landuse", "residential-boundary"),
# Z-Order 2 # Z-Order 2
("waterway", "river", 10),
("waterway", "stream", 10),
("leisure", "nature_reserve", "landuse", "forest"), ("leisure", "nature_reserve", "landuse", "forest"),
("landuse", "forest", "landuse", "forest"), ("landuse", "forest", "landuse", "forest"),
# Z-Order 3 # Z-Order 3
@ -108,8 +110,6 @@ mstr_ortho_layers = [
("water", "lake", "natural", "water"), ("water", "lake", "natural", "water"),
("water", "pond", "natural", "water"), ("water", "pond", "natural", "water"),
("water", "river", "natural", "water"), ("water", "river", "natural", "water"),
("waterway", "river", 10),
("waterway", "stream", 10),
("amenity", "parking", "amenities", "parking"), ("amenity", "parking", "amenities", "parking"),
("highway", "pedestrian", 4), ("highway", "pedestrian", 4),
# Z-Order 4 # Z-Order 4

View File

@ -89,6 +89,12 @@ class mstr_orthographic:
osmxml.adjust_bbox(bb_lat, bb_lng, bb_lat_edge, bb_lng_edge) osmxml.adjust_bbox(bb_lat, bb_lng, bb_lat_edge, bb_lng_edge)
mstr_msg("mstr_orthographic", "Adjusted bounding box for XML object") mstr_msg("mstr_orthographic", "Adjusted bounding box for XML object")
# Determine what to do... maybe work was interrupted
if os.path.isfile(mstr_datafolder + "Tiles\\" + str(self._lat) + "_" + str(self._long) + "\\Textures\\" + str(cur_tile_y) + "_" + str(cur_tile_x) + ".jpg") == False:
# Let the user know
mstr_msg("mstr_orthographic", "Generating missing orthophoto " + str(cur_tile_y) + "-" + str(cur_tile_x))
# Get the data # Get the data
osmxml.acquire_osm(cur_tile_y, cur_tile_x) # <- This acquires current OSM info osmxml.acquire_osm(cur_tile_y, cur_tile_x) # <- This acquires current OSM info
mstr_msg("mstr_orthographic", "Acquired current OSM info from marstr.online repository") mstr_msg("mstr_orthographic", "Acquired current OSM info from marstr.online repository")
@ -128,8 +134,8 @@ class mstr_orthographic:
pg = mstr_photogen(self._lat, self._long, cur_tile_y, cur_tile_x) pg = mstr_photogen(self._lat, self._long, cur_tile_y, cur_tile_x)
pg.genphoto() pg.genphoto()
mstr_msg("mstr_orthographic", "Ortho photo generated") mstr_msg("mstr_orthographic", "Ortho photo generated")
mstr_msg("", "") # <- Spacer print("")
mstr_msg("", "") # <- Spacer print("")
# Store a terrain file # Store a terrain file
''' '''