def test_import_gtfs(self):
        # self.gtfs = create_gtfsdb(gtfs_folder, save_db=gtfs_db_output, overwrite=True, spatialite_enabled=True)
        self.gtfs = create_gtfsdb(gtfs_folder, save_db=gtfs_db_output, overwrite=True, spatialite_enabled=False)
        self.gtfs.import_gtfs()

        self.gtfs = create_gtfsdb(gtfs_zip, save_db=gtfs_db_output, overwrite=True, spatialite_enabled=False)
        self.gtfs.import_gtfs()
Esempio n. 2
0
    def test_import_gtfs(self):
        # self.gtfs = create_gtfsdb(gtfs_folder, save_db=gtfs_db_output, overwrite=True, spatialite_enabled=True)
        self.gtfs = create_gtfsdb(gtfs_folder,
                                  save_db=gtfs_db_output,
                                  overwrite=True,
                                  spatialite_enabled=False)
        self.gtfs.import_gtfs()

        self.gtfs = create_gtfsdb(gtfs_zip,
                                  save_db=gtfs_db_output,
                                  overwrite=True,
                                  spatialite_enabled=False)
        self.gtfs.import_gtfs()
Esempio n. 3
0
 def test_create_database(self):
     self.gtfs = create_gtfsdb(gtfs_zip,
                               save_db=gtfs_db_output,
                               overwrite=True,
                               spatialite_enabled=True)
     self.gtfs.create_database()
     self.gtfs.conn.close()
Esempio n. 4
0
 def test_create_database(self):
     # TODO: Fix Travis-ci configuration in order to properly run the test with spatialite enabled
     self.gtfs = create_gtfsdb(gtfs_zip,
                               save_db=gtfs_db_output,
                               overwrite=True,
                               spatialite_enabled=False)
     self.gtfs.create_database()
     self.gtfs.conn.close()
Esempio n. 5
0
    def run(self):
        data_source = self.gtfs_source.text()
        output_file = self.gtfs_output.text()
        if not os.path.isfile(data_source):
            if not os.path.isdir(data_source):
                qgis.utils.iface.messageBar().pushMessage(
                    "Data source does not exist", '', level=3)
                return

        self.running = True
        self.source_widget.setVisible(False)
        self.output_widget.setVisible(False)
        self.but_process.setEnabled(False)
        self.options_widget.setVisible(False)
        self.source_type_widget.setVisible(False)
        self.progress_widget.setVisible(True)

        self.logger.info(data_source)
        self.worker_thread = create_gtfsdb(
            data_source,
            save_db=output_file,
            overwrite=True,
            spatialite_enabled=self.spatial.isChecked())
        self.run_thread()
 def test_create_database(self):
     #TODO: Fix Travis-ci configuration in order to properly run the test with spatialite enabled
     self.gtfs = create_gtfsdb(gtfs_zip, save_db=gtfs_db_output, overwrite=True, spatialite_enabled=False)
     self.gtfs.create_database()
     self.gtfs.conn.close()