-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__init__.py
50 lines (44 loc) · 2.12 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# -*- coding: utf-8 -*-
"""
/***************************************************************************
TopoChronia
A QGIS plugin
This plugin processes plate tectonic model input data into maps of the Earth past topography and geography.
Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/
-------------------
begin : 2024-10-01
copyright : (C) 2024 by Florian Franziskakis
email : florian.franziskakis@unige.ch
git sha : $Format:%H$
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
This script initializes the plugin, making it known to QGIS.
"""
import os
import sys
# Define the path to the ext_libraries folder (relative to __init__.py)
extlibs = os.path.abspath(os.path.join(os.path.dirname(__file__), "ext_libraries"))
# Check if the folder exists and isn't already in sys.path
if os.path.exists(extlibs) and extlibs not in sys.path:
sys.path.insert(0, extlibs)
# You can now import libraries from ext_libraries
try:
import geopy
except ImportError as e:
raise ImportError(f"Failed to import geopy from {extlibs}. Error: {e}")
# noinspection PyPep8Naming
def classFactory(iface): # pylint: disable=invalid-name
"""Load TopoChronia class from file TopoChronia.
:param iface: A QGIS interface instance.
:type iface: QgsInterface
"""
#
from .topo_chronia import TopoChronia
return TopoChronia(iface)