def test01_gsielevtile(self): """test exporting with GSI elevation tile plugin""" projectPath = dataPath("testproject1.qgs") mapSettings = loadProject(projectPath) # zoom mapSettings.setExtent(QgsRectangle(-51698, -75431, 21286, -20179)) # output size width = 800 height = width * mapSettings.extent().height() / mapSettings.extent().width() mapSettings.setOutputSize(QSize(width, height)) exporter = Exporter(None, dataPath("gsielevtile.qto3settings")) exporter.settings.pluginManager = PluginManager(True) # enables all plugins exporter.settings.setMapSettings(mapSettings) err = exporter.export(outputPath(os.path.join("testproject1", "gsielevtile.html"))) assert err == Exporter.NO_ERROR, err
def test02_export_project1(self): """test exporting from a test project""" projectPath = dataPath("testproject1.qgs") mapSettings = loadProject(projectPath) # output size width = 800 height = width * mapSettings.extent().height() / mapSettings.extent().width() mapSettings.setOutputSize(QSize(width, height)) exporter = Exporter(None, dataPath("testproject1.qto3settings")) exporter.setMapSettings(mapSettings) err = exporter.export(outputPath(os.path.join("testproject1", "testproject1.html"))) assert err == Exporter.NO_ERROR, err # test export with flat plane and vector objects exporter.settings.data[ObjectTreeItem.ITEM_DEM]["comboBox_DEMLayer"] = 0 err = exporter.export(outputPath(os.path.join("testproject1", "flatplane.html"))) assert err == Exporter.NO_ERROR, err
def test01_gsielevtile(self): """test exporting with GSI elevation tile plugin""" return # TODO projectPath = dataPath("testproject1.qgs") mapSettings = loadProject(projectPath) # zoom mapSettings.setExtent(QgsRectangle(-51698, -75431, 21286, -20179)) # output size width = 800 height = width * mapSettings.extent().height() / mapSettings.extent().width() mapSettings.setOutputSize(QSize(width, height)) exporter = Exporter(None, dataPath("gsielevtile.qto3settings")) exporter.settings.setMapSettings(mapSettings) err = exporter.export(outputPath(os.path.join("testproject1", "gsielevtile.html"))) assert err == Exporter.NO_ERROR, err