forked from anitagraser/processing_pysal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pysalprovider.py
35 lines (26 loc) · 913 Bytes
/
pysalprovider.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
from processing.core.AlgorithmProvider import AlgorithmProvider
from moran import Moran
from moranrate import MoranRate
from moranlocal import MoranLocal
from moranlocalrate import MoranLocalRate
from getisordg import G
from getisordglocal import GLocal
class pysalProvider(AlgorithmProvider):
def __init__(self):
AlgorithmProvider.__init__(self)
self.activate = False
self.alglist = [Moran(), MoranRate(),
MoranLocal(), MoranLocalRate(),
G(), GLocal()]
for alg in self.alglist:
alg.provider = self
def initializeSettings(self):
AlgorithmProvider.initializeSettings(self)
def unload(self):
AlgorithmProvider.unload(self)
def getName(self):
return 'pysal'
def getDescription(self):
return 'PySAL'
def _loadAlgorithms(self):
self.algs = self.alglist