forked from 3liz/QgisCadastrePlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cadastre_server.py
50 lines (46 loc) · 2.43 KB
/
cadastre_server.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 -*-
"""
/***************************************************************************
Cadastre - QGIS plugin menu class
A QGIS plugin
This plugins helps users to import the french land registry ('cadastre')
into a database. It is meant to ease the use of the data in QGIs
by providing search tools and appropriate layer symbology.
-------------------
begin : 2013-06-11
copyright : (C) 2013 by 3liz
email : [email protected]
***************************************************************************/
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
"""
try:
from qgis.server import (
serverIface,
QgsServerFilter
)
except:
pass
from qgis.core import (
QgsMessageLog,
QgsLogger
)
class cadastreServer(object):
"""Plugin for QGIS server
this plugin loads Cadastre server tools"""
def __init__(self, serverIface):
# Save reference to the QGIS server interface
self.serverIface = serverIface
QgsMessageLog.logMessage("SUCCESS - Cadastre init", 'plugin', QgsMessageLog.INFO)
from .filters.cadastreFilter import cadastreFilter
try:
serverIface.registerFilter( cadastreFilter(serverIface), 100 )
except Exception as e:
QgsLogger.debug("cadastreServer - Error loading filter cadastreServer : %s" % e )
QgsMessageLog.logMessage("CADASTRE - Error loading filter cadastreServer: %s" % e, 'plugin', QgsMessageLog.WARNING)