72 lines
1.9 KiB
Python
72 lines
1.9 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
|
|
|
|
if len(sys.argv) == 3:
|
|
cli = 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())
|
|
og._buildTile()
|
|
|
|
|
|
# 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.
|