Beispiel #1
0
 def __init__(self, dir_jobs, dir_data, mail_server):
     check_commands()
     self.__dir_jobs = os.path.abspath(dir_jobs)
     self.__dir_data = os.path.abspath(dir_data)
     self.__mail_server = mail_server
     self.__run = False
Beispiel #2
0
import os.path
import shutil
from zipfile import ZipFile, ZIP_DEFLATED, ZIP_STORED
from datetime import datetime
from xcsoar.mapgen.terrain import srtm
from xcsoar.mapgen.topology import shapefiles
from xcsoar.mapgen.georect import GeoRect
from xcsoar.mapgen.filelist import FileList
from xcsoar.mapgen.downloader import Downloader
from xcsoar.mapgen.util import check_commands, spew

check_commands()

class Generator:
    def __init__(self, dir_data, dir_temp):
        '''
        Constructor of the MapGenerator class
        @param dir_data: Path of the data folder
        @param dir_temp: Path of the temporary folder
        '''

        self.__downloader = Downloader(dir_data)

        self.__dir_temp = os.path.abspath(dir_temp)
        if not os.path.exists(self.__dir_temp):
            os.mkdir(self.__dir_temp)

        self.__bounds = None
        self.__files = FileList()

    def add_information_file(self, name, author = 'unknown'):
Beispiel #3
0
 def __init__(self, dir_jobs, dir_data, mail_server):
     check_commands()
     self.__dir_jobs = os.path.abspath(dir_jobs)
     self.__dir_data = os.path.abspath(dir_data)
     self.__mail_server = mail_server
     self.__run = False
Beispiel #4
0
import os.path
import shutil
from zipfile import ZipFile, ZIP_DEFLATED, ZIP_STORED
from datetime import datetime
from xcsoar.mapgen.waypoints import welt2000cup
from xcsoar.mapgen.terrain import srtm
from xcsoar.mapgen.topology import shapefiles
from xcsoar.mapgen.georect import GeoRect
from xcsoar.mapgen.filelist import FileList
from xcsoar.mapgen.downloader import Downloader
from xcsoar.mapgen.util import check_commands, spew

check_commands()

class Generator:
    def __init__(self, dir_data, dir_temp):
        '''
        Constructor of the MapGenerator class
        @param dir_data: Path of the data folder
        @param dir_temp: Path of the temporary folder
        '''

        self.__downloader = Downloader(dir_data)

        self.__dir_data = os.path.abspath(dir_data)
        self.__dir_temp = os.path.abspath(dir_temp)
        if not os.path.exists(self.__dir_temp):
            os.mkdir(self.__dir_temp)

        self.__bounds = None
        self.__files = FileList()