Skip to main content

Posts

Showing posts from February, 2011

Getting Ready for Quantum GIS Plugin Development

Quantum GIS   (QGIS) is a desktop GIS application that can be extended with Python  plugins. We are going to use Plugin Builder from within QGIS. Plugin Builder is not installed by default. Start QGIS and follow these steps to install Plugin Builder: Installing Plugin Builder Select Plugins->Fetch Python Plugins. A QGIS Python Plugin Installer dialog box will open. Select Repositories tab. Click on Add 3rd party repositories button. A confirmation dialog box will appear. Click Ok. Another dialog box will appear to fetch the repositories. The dialog box will close itself. Select Plugins tab. Select Plugin Builder from the list. Click on Install Plugin button. Plugin Builder menu will appear in Plugins menu. Select Plugins->Plugin Builder->Plugin Builder to start the Plugin Builder. A QGIS Plugin Builder dialog box will appear. Generating QGIS Python plugin file set We use the Plugin Builder to generate a basic file set for our QGIS Python plugin. Fill in the

Setting Up PyScripter for Quantum GIS

PyScripter is a general purpose Python Integrated Development Environment (IDE). Quantum GIS (QGIS) is a desktop GIS application that can be extended with Python plugins. Both are open source softwares. We intend to use PyScripter as an IDE to build QGIS Python plugin. We are using PyScripter 2.4.1.0 and QGIS 1.6.0 in Windows. PyScripter does not come with Python. On the other hand, QGIS is built in with Python. Thus, we will setup up PyScripter to use the build in Python in QGIS. We assume both PyScripter and QGIS are already installed. Preparing PyScripter batch file We assume that QGIS is installed in C:\OSGeo4W\ folder and PyScripter is installed in C:\Program Files\PyScripter\ . 1. Copy qgis.bat in C:\OSGeo4W\ bin to pyscripter.bat 2. Edit pyscripter.bat to remove the last line that read something like this start "Quantum GIS" /B "%OSGEO4W_ROOT%"\apps\qgis\bin\qgis.exe %* and replace it with this in one line Start "PyScripter" /B "C:\Progr