orthographic/defines.py

308 lines
11 KiB
Python
Raw Normal View History

# -------------------------------------------------------------------
# ORTHOGRAPHIC
# Your personal aerial satellite. Always on. At any altitude.*
# Developed by MarStrMind
# License: Open Software License 3.0
# Up to date version always on marstr.online
# -------------------------------------------------------------------
# defines.py
# Variables we need in all functions. Each one is documented below.
# -------------------------------------------------------------------
# Your data folder - meaning where the cache is stored, and where the finished
# tiles will go. This is also the folder where the image generation sources are
# stored.
mstr_datafolder = "D:/Developer/Projects/orthographic/"
# API endpoint to acquire OSM data (bonus: I have my own)
#mstr_osm_endpoint = "https://marstr.online/osm/v1/"
mstr_osm_endpoint = "http://localhost/og.php"
# Define the texture resolution you want to have your photos at.
mstr_photores = 2048
# Radius of zoom level 18 aerials around airports with ICAO code
# Value is in tiles - not in km
#
# Value = 5:
# #####
# #####
# ##O##
# #####
# #####
#
# The "X" is the tile with the airport
mstr_airport_radius = 5
# Clear cache after generating a complete tile?
mstr_clear_cache = True
# Removes the masks etc after a tile has been generated. Strong recommendation to set this
# to True.
# Whether or not you want to see progress of the tool as it walks on.
# High recommendation to leave this on.
mstr_show_log = False
# Should a pseudo shadow be rendered on certain elements?
# The sun is usually somewhere when a photo is taken during the day. Therefore,
# some kind of shadow is cast in a direction, but this depends on a lot of factors.
# We will simply things to achieve good-looking results.
# You can, however, disable the shadow rendering layer here.
mstr_shadow_enabled = True
mstr_shadow_strength = 0.65
mstr_shadow_shift = 4
mstr_shadow_floor_h = 2.8 # 2.5m ceiling height + 30cm concrete per floor
# The tags that cast shadows
mstr_shadow_casters = [
("landuse", "forest"),
("leisure", "nature_reserve"),
("natural", "wood")
]
# Whether or not to generate X-Plane Scenery files
mstr_xp_genscenery = True
# Generate normal maps for X-Plane scenery?
# Strong recommendation: yes
mstr_xp_scn_normalmaps = True
# Paths to required X-Plane scenery tools
#mstr_xp_meshtool = "/home/marcus/Developer/Projects/orthographic/bin/MeshTool"
mstr_xp_ddstool = "D:/Developer/Projects/orthographic/bin/DDSTool.exe"
mstr_xp_dsftool = "D:/Developer/Projects/orthographic/bin/DSFTool.exe"
#mstr_xp_xessrc = "https://dev.x-plane.com/update/misc/MeshTool/"
mstr_xp_floor_height = 2.8 # 2.5m ceiling height + 30cm concrete per floor
mstr_xp_ortho_location = "D:/Simulator/12/Custom Scenery/z_orthographic/"
# How much of a tile we need for each zoom level. The higher
# the zoom level, the smaller the area to generate a mask of - but also
# higher detail.
mstr_zl_16 = 0.064
mstr_zl_17 = 0.048
mstr_zl_18 = 0.016
mstr_zl_19 = 0.008
# The layers we will process, from bottom to top.
# Tag, and value.
# Strong recommendation NOT to alter this list -
# generating the orthos depends on the pool of source
# material I provide for these layers. If you add your own
# OSM tag, and there is no source material, the script will
# most likely crash.
mstr_ortho_layers = [
# Z-Order 0
#("boundary", "administrative", "admin_level", ["8", "9", "10", "12"], "landuse", "residential-boundary"),
# Z-Order 1
("landuse", "residential", "landuse", "residential-boundary"),
("landuse", "grass", "landuse", "grass"),
("landuse", "cemetery", "landuse", "grass"),
("landuse", "recreation_ground", "landuse", "meadow"),
("leisure", "golf_course", "leisure", "golf_course"),
("landuse", "greenfield", "landuse", "grass"),
("landuse", "orchard", "landuse", "meadow"),
("landuse", "meadow", "landuse", "meadow"),
("landuse", "construction", "landuse", "construction"),
2024-10-05 11:29:24 +02:00
("natural", "grassland", "landuse", "meadow"),
("barrier", "hedge", "natural", "heath"),
("landuse", "vineyard", "landuse", "meadow"),
2024-10-05 11:29:24 +02:00
("natural", "bare_rock", "natural", "bare_rock"),
("highway", "track", 1),
("highway", "path", 1),
("highway", "footway", 1),
("leisure", "park", "leisure", "green"),
("leisure", "dog_park", "leisure", "green"),
("leisure", "garden", "leisure", "green"),
("leisure", "sports_centre", "leisure", "green"),
("leisure", "pitch", "leisure", "green"),
("leisure", "playground", "leisure", "green"),
("landuse", "farmland", "landuse", "farmland"),
("landuse", "farmyard", "landuse", "farmland"),
("landuse", "military", "landuse", "residential-boundary"),
# Z-Order 2
("highway", "service", 2),
("highway", "residential", 4),
("highway", "primary", 6),
("highway", "secondary", 3),
2025-02-06 19:32:50 +01:00
("highway", "trunk", 3),
("highway", "tertiary", 5),
("highway", "unclassified", 4),
("highway", "living_street", 3),
("waterway", "stream", 1),
("amenity", "parking", "amenity", "parking"),
("amenity", "school", "amenity", "school"),
("leisure", "nature_reserve", "landuse", "forest"),
("landuse", "forest", "landuse", "forest"),
("natural", "wood", "natural", "wood"),
("natural", "tree_row", 5),
("natural", "wetland", "natural", "wetland"),
("natural", "scrub", "natural", "scrub"),
("natural", "heath", "natural", "heath"),
("natural", "sand", "natural", "sand"),
("natural", "desert", "natural", "desert"),
# Z-Order 3
("natural", "bay", "natural", "beach"),
("natural", "beach", "natural", "beach"),
("leisure", "swimming_pool", "natural", "water"),
("highway", "pedestrian", 1),
# Z-Order 4
("highway", "motorway", 8),
("railway", "rail", 2),
# Z-Order 5
("aeroway", "taxiway", 11),
("aeroway", "runway", 20),
("building", "detached", "building", "common"),
("building", "church", "building", "common"),
("building", "hotel", "building", "industrial"),
("building", "farm", "building", "industrial"),
("building", "semidetached_house", "building", "common"),
("building", "apartments", "building", "common"),
("building", "civic", "building", "common"),
("building", "garage", "building", "industrial"),
("building", "office", "building", "office"),
("building", "retail", "building", "industrial"),
("building", "industrial", "building", "industrial"),
("building", "house", "building", "house"),
("building", "terrace", "building", "industrial"),
("building", "hangar", "building", "industrial"),
("building", "school", "building", "common"),
("building", "kindergarten", "building", "kindergarten"),
("building", "public", "building", "public"),
("building", "commercial", "building", "commercial"),
("building", "warehouse", "building", "warehouse"),
("building", "yes", "building", "common"),
#("waterway", "river", 3),
("water", "lake", "natural", "water"),
("water", "pond", "natural", "water"),
("water", "river", "natural", "water"),
("water", "reservoir", "natural", "water"),
("natural", "water", "natural", "water"),
("place", "sea", "natural", "sea"),
("place", "ocean", "natural", "sea")
]
# Blur values for the single masks of the ortho layers
mstr_mask_blur = [
# Z-Order 0
("landuse", "residential", 5),
("boundary", "administrative", 5),
# Z-Order 1
("landuse", "grass", 3),
("landuse", "cemetery", 3),
("landuse", "greenfield", 3),
("landuse", "orchard", 3),
("landuse", "meadow", 3),
("landuse", "construction", 1),
("barrier", "hedge", 1),
("landuse", "recreation_ground", 5),
("landuse", "vineyard", 3),
("natural", "grassland", 3),
("natural", "wetland", 7),
("natural", "scrub", 4),
("natural", "heath", 4),
("leisure", "park", 4),
("leisure", "golf_course", 6),
("leisure", "dog_park", 4),
("leisure", "garden", 5),
("leisure", "sports_centre", 2),
("leisure", "pitch", 1),
("leisure", "playground", 2),
("landuse", "farmland", 3),
("landuse", "farmyard", 3),
# Z-Order 2
("landuse", "forest", 3),
("leisure", "nature_reserve", 3),
("natural", "wood", 3),
("natural", "tree_row", 3),
("landuse", "military", 4),
# Z-Order 3
("natural", "bare_rock", 6),
("natural", "water", 1),
("natural", "bay", 7),
("natural", "beach", 7),
("natural", "sand", 3),
("water", "lake", 3),
("water", "pond", 3),
("water", "river", 3),
("water", "reservoir", 1),
("leisure", "swimming_pool", 3),
#("waterway", "river", 3),
("waterway", "stream", 2),
("amenity", "parking", 1),
("amenity", "school", 1),
("highway", "pedestrian", 3),
# Z-Order 4
2024-12-20 21:40:55 +01:00
("highway", "motorway", 0.5),
("highway", "primary", 0.5),
("highway", "trunk", 0.5),
2024-12-20 21:40:55 +01:00
("highway", "secondary", 0.5),
("highway", "tertiary", 0.5),
("highway", "unclassified", 0.5),
("highway", "living_street", 0.5),
("highway", "residential", 0.5),
("highway", "service", 0.5),
("highway", "footway", 1),
("highway", "track", 1),
("highway", "path", 1),
("railway", "rail", 1),
# Z-Order 5
("aeroway", "taxiway", 2),
("aeroway", "runway", 2),
("building", "detached", 1),
("building", "church", 1),
("building", "hotel", 1),
("building", "farm", 1),
("building", "semidetached_house", 1),
("building", "apartments", 1),
("building", "civic", 1),
("building", "garage", 1),
("building", "office", 1),
("building", "retail", 1),
("building", "industrial", 1),
("building", "house", 1),
("building", "terrace", 1),
("building", "hangar", 1),
("building", "school", 1),
("building", "kindergarten", 1),
("building", "public", 1),
("building", "commercial", 1),
("building", "warehouse", 1),
("building", "yes", 0),
("place", "sea", 1),
("place", "ocean", 1)
]
mstr_completion_colors = [
("+50+000", [
(48,63,34),
(81,95,64),
(105,100,64),
(91,105,72),
(78,69,41),
(116,113,78),
(90,94,69),
(58,68,40),
(57,72,41),
(93,103,76),
(139,142,111),
(92,102,73),
(71,86,55),
(103,105,91),
(96,78,56),
(143,141,113),
(107,108,74),
(41,56,34),
(51,63,41),
(137,137,107)
]
)
]