# ------------------------------------------------------------------- # 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 = "M:/Developer/Projects/orthographic/" # API endpoint to acquire OSM data (bonus: I have my own) mstr_osm_endpoint = "https://marstr.online/osm/v1/" # Define the texture resolution you want to have your photos at. mstr_photores = 2048 # <- Change this to 4096 for 16k resolution # Radius of zoom level 18 aerials around airports with ICAO code # Value is in tiles - not in km # # Value = 5: # ##### # ##### # ##X## # ##### # ##### # # 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 = True # 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.85 mstr_shadow_shift = 24 # The tags that cast shadows mstr_shadow_casters = [ ("landuse", "forest"), ("leisure", "nature_reserve"), ("building", "semidetached_house"), ("building", "apartments"), ("building", "garage"), ("building", "office"), ("building", "retail"), ("building", "industrial"), ("building", "yes") ] # 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.08 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 ("landuse", "residential", "landuse", "residential-boundary"), ("boundary", "administrative", "admin_level", ["8", "9", "10", "12"], "landuse", "residential-boundary"), # Z-Order 1 ("landuse", "grass", "landuse", "grass"), ("landuse", "cemetery", "landuse", "grass"), ("landuse", "greenfield", "landuse", "grass"), ("landuse", "orchard", "landuse", "meadow"), ("landuse", "meadow", "landuse", "meadow"), ("landuse", "recreation_ground", "landuse", "meadow"), ("leisure", "golf_course", "leisure", "golf_course"), ("barrier", "hedge", "natural", "heath"), ("landuse", "vineyard", "landuse", "meadow"), ("highway", "track", 3), ("highway", "path", 3), ("natural", "bare_rock", "natural", "bare_rock"), ("natural", "grassland", "landuse", "meadow"), ("natural", "wetland", "natural", "wetland"), ("natural", "scrub", "natural", "scrub"), ("natural", "heath", "natural", "heath"), ("leisure", "park", "leisure", "green"), ("leisure", "dog_park", "leisure", "green"), ("leisure", "garden", "leisure", "green"), ("leisure", "sports_centre", "leisure", "green"), ("leisure", "pitch", "leisure", "green"), ("landuse", "farmland", "landuse", "farmland"), ("landuse", "farmyard", "landuse", "farmland"), ("landuse", "military", "landuse", "residential-boundary"), # Z-Order 2 ("highway", "service", 6), ("highway", "residential", 12), ("highway", "footway", 4), ("highway", "primary", 25), ("highway", "secondary", 13), ("highway", "tertiary", 20), ("highway", "unclassified", 17), ("highway", "living_street", 12), ("waterway", "river", 10), ("waterway", "stream", 10), ("leisure", "nature_reserve", "landuse", "forest"), ("landuse", "forest", "landuse", "forest"), # Z-Order 3 ("natural", "water", "natural", "water"), ("natural", "bay", "natural", "beach"), ("natural", "beach", "natural", "beach"), ("water", "lake", "natural", "water"), ("water", "pond", "natural", "water"), ("water", "river", "natural", "water"), ("amenity", "parking", "amenities", "parking"), ("highway", "pedestrian", 4), # Z-Order 4 ("highway", "motorway", 32), ("railway", "rail", 5), # Z-Order 5 ("aeroway", "taxiway", 42), ("aeroway", "runway", 80), ("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", "yes", "building", "common") ] # Blur values for the single masks of the ortho layers mstr_mask_blur = [ # Z-Order 0 ("landuse", "residential", 30), ("boundary", "administrative", 30), # Z-Order 1 ("landuse", "grass", 30), ("landuse", "cemetery", 30), ("landuse", "greenfield", 30), ("landuse", "orchard", 30), ("landuse", "meadow", 30), ("barrier", "hedge", 5), ("landuse", "recreation_ground", 20), ("landuse", "vineyard", 30), ("natural", "grassland", 30), ("natural", "wetland", 30), ("natural", "scrub", 20), ("natural", "heath", 20), ("leisure", "park", 30), ("leisure", "golf_course", 25), ("leisure", "dog_park", 35), ("leisure", "garden", 20), ("leisure", "sports_centre", 5), ("leisure", "pitch", 2), ("landuse", "farmland", 10), ("landuse", "farmyard", 10), # Z-Order 2 ("landuse", "forest", 20), ("leisure", "nature_reserve", 20), ("landuse", "military", 30), # Z-Order 3 ("natural", "bare_rock", 25), ("natural", "water", 4), ("natural", "bay", 30), ("natural", "beach", 30), ("water", "lake", 10), ("water", "pond", 10), ("water", "river", 10), ("waterway", "river", 10), ("waterway", "stream", 10), ("amenity", "parking", 3), ("highway", "pedestrian", 12), # Z-Order 4 ("highway", "motorway", 5), ("highway", "primary", 5), ("highway", "secondary", 5), ("highway", "tertiary", 5), ("highway", "unclassified", 5), ("highway", "living_street", 5), ("highway", "residential", 5), ("highway", "service", 3), ("highway", "footway", 3), ("highway", "track", 3), ("highway", "path", 3), ("railway", "rail", 4), # Z-Order 5 ("aeroway", "taxiway", 12), ("aeroway", "runway", 12), ("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", "yes", 1) ]