84 lines
2.2 KiB
Python

# -------------------------------------------------------------------
# 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
# -------------------------------------------------------------------
# og.py
# Main file to call to generate an ortho tile; entry point to tool.
# -------------------------------------------------------------------
import sys
import os
from orthographic import *
from log import *
from defines import *
# Print a welcome message
print(" ")
print(" ---------------------------------------------------------------- ")
print(" ORTHOGRAPHIC: An ortho-photo generator, using real world data.")
print(" Developed by MarStr - Code available on marstr.online")
print(" ---------------------------------------------------------------- ")
print(" ")
# Evaluate CLI arguments and process tile.
cli = False
pbf = False
prep = False
if len(sys.argv) == 4:
cli = True
if sys.argv[3] == "true": prep = True
#if len(sys.argv) == 4:
# pbf = True
# Only if we find enough arguments, proceed.
if cli == True:
lat = int(sys.argv[1])
lng = int(sys.argv[2])
mstr_msg("_main", "Beginning tile generation process.")
# Create the class and init values
og = mstr_orthographic(lat, lng, mstr_datafolder, os.getcwd(), prep)
if prep == True:
og._prepareTile()
if prep == False:
if sys.argv[3] != "xpscenery":
og._generateOrthos_mt(int(sys.argv[3]))
# Build the terrain mesh and assign ground textures
if sys.argv[3] == "xpscenery":
og.generate_xp_scenery()
# Only if we find enough arguments, proceed.
if pbf == True:
lat = int(sys.argv[1])
lng = int(sys.argv[2])
pbf = sys.argv[3]
if pbf == "pbf":
# Create the class and init values
og = mstr_orthographic(lat, lng, mstr_datafolder, os.getcwd())
og._generateData()
if cli == False and pbf == False:
mstr_msg("_main", "Please provide Latitude and Longitude. Exiting.")
print ("")
# * No Space Shuttle or SpaceShipOne needed to deploy.