-
Notifications
You must be signed in to change notification settings - Fork 31
/
provider.py
44 lines (37 loc) · 1.72 KB
/
provider.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
"""
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
"""
import os
from qgis.core import QgsProcessingProvider, Qgis
from qgis.PyQt.QtGui import QIcon
from .htmlExpansionAlgorithm import HTMLExpansionAlgorithm
from .importKml import ImportKmlAlgorithm
from .exportKmz import ExportKmzAlgorithm
if Qgis.QGIS_VERSION_INT >= 31400:
from .convertGroundOverlays import ConvertGroundOverlayAlgorithm
from .createGroundOverlayGeoTiff import CreateGroundOverlayGeoTiffAlgorithm
class KmlToolsProvider(QgsProcessingProvider):
def unload(self):
QgsProcessingProvider.unload(self)
def loadAlgorithms(self):
self.addAlgorithm(HTMLExpansionAlgorithm())
self.addAlgorithm(ImportKmlAlgorithm())
self.addAlgorithm(ExportKmzAlgorithm())
if Qgis.QGIS_VERSION_INT >= 31400:
self.addAlgorithm(ConvertGroundOverlayAlgorithm())
self.addAlgorithm(CreateGroundOverlayGeoTiffAlgorithm())
def icon(self):
return QIcon(os.path.dirname(__file__) + '/icons/import.svg')
def id(self):
return 'kmltools'
def name(self):
return 'KML tools'
def longName(self):
return self.name()