交通安全に係るビッグデータを活用するためのデータプラットフォーム構築の試み
90/110

84 付録6:QGISプラグインのソースコード # -*- coding: utf-8 -*- """ /*************************************************************************** crash A QGIS plugin despict crash data ------------------- begin : 2018-11-15 git sha : $Format:%H$ copyright : (C) 2018 by Jia YANG email : yang@ttri.or.jp ***************************************************************************/ /*************************************************************************** * * * 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. * * * ***************************************************************************/ """ from qgis.core import * from PyQt4.QtCore import QSettings, QTranslator, qVersion, QCoreApplication from PyQt4.QtGui import * #from qgis.util import * #from qgis.util import * # Import the code for the dialog from crash_manage_dialog import crashDialog #from qgis.utils import iface # Initialize Qt resources from file resources.py import os import resources import processing currentPath="C:¥¥Users¥¥Administrator¥¥.qgis2¥¥python¥¥plugins¥¥crash" years=["2004","2005","2006","2007","2008","2009","2010","2011","2012","2013","2014"] class crash: """QGIS Plugin Implementation.""" def __init__(self, iface): """Constructor. :param iface: An interface instance that will be passed to this class which provides the hook by which you can manipulate the QGIS application at run time. :type iface: QgisInterface """ # Save reference to the QGIS interface self.iface = iface # initialize plugin directory self.plugin_dir = os.path.dirname(__file__)

元のページ  ../index.html#90

このブックを見る