1 / 9

QGIS Plugin Development

QGIS Plugin Development. Xing Kang, Yan-ting Liau , Ngoc Nguyen Hong, Michael Palmer. Overview. What is QGIS? What were our goals? QT Framework GUI Implementation Methods Implemented Weights Matrix Creation ESDA – Moran’s I Spatial Dynamics – Spatial Markov

Download Presentation

QGIS Plugin Development

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. QGIS Plugin Development Xing Kang, Yan-ting Liau, Ngoc Nguyen Hong, Michael Palmer

  2. Overview • What is QGIS? • What were our goals? • QT Framework • GUI Implementation • Methods Implemented • Weights Matrix Creation • ESDA – Moran’s I • Spatial Dynamics – Spatial Markov • QGIS PySalPlugin in Action!

  3. QGIS (Quantum GIS) • Open source GIS • Small lightweight • Easy to learn • GNU GPL License

  4. Goals: Pruning the PySal Tree

  5. Why Use QT? • QGIS is written using QT Library • Why did they use QT? • Cross Platform • Widely used (Photoshop and Skype also use QT) • What we liked • Fast rough development with WYSISYG Editor • Fine tune the code afterwards

  6. Signals in QT • User actions generate signals • use signals to change other widgets in the Editor • Handle signals with python functions The function name corresponds to the specific signal @pyqtSignature('int') #prevents actions being handled twice defon_sourceLayer_currentIndexChanged(self,i): l = self.layers[i] self.lcount = l.featureCount() self.ui.horizontalSlider.setMaximum(self.lcount-1) self.ui.horizontalSlider.setTickInterval((self.lcount-1)/10 or 1) select the layer with the index i Use a method of Layer Update a GUI Widget Update a GUI Widget

  7. Design Decisions • Use the PySal splatter-chart to organize our plugin • PySalMenuBar. • Each Branch is a submenu. • Each Node is an Action in the submenu.

  8. One quick python trick • Instead of adding another if statement • Python returns the last variable read for boolean logic. • Remember False = (0, “”, None) True = (all else) • .setTickInterval((self.lcount-1)/10 or 1) use (self.lcount-1)/10 unless it equals 0 then use 1 Numbers Strings

More Related