Skip to content


Merged in Arunmozhi's heatmap plugin into QGIS core
Browse files Browse the repository at this point in the history
  • Loading branch information
timlinux committed Feb 8, 2012
1 parent bc43fdd commit 03fd388
Show file tree
Hide file tree
Showing 14 changed files with 1,268 additions and 15 deletions.
6 changes: 3 additions & 3 deletions INSTALL
@@ -1,10 +1,10 @@
Quantum GIS (QGIS)
Building QGIS from source - step by step
Tuesday December 27, 2011
Monday February 06, 2012

Last Updated: Tuesday December 27, 2011
Last Change : Tuesday December 27, 2011
Last Updated: Monday February 06, 2012
Last Change : Wednesday February 01, 2012

1. Introduction
Expand Down
24 changes: 12 additions & 12 deletions doc/INSTALL.html
Expand Up @@ -80,13 +80,13 @@
<DIV CLASS="header" ID="header">
<H1>Quantum GIS (QGIS)</H1>
<H2>Building QGIS from source - step by step</H2>
<H3>Sunday November 06, 2011</H3>
<H3>Monday February 06, 2012</H3>

<DIV CLASS="body" ID="body">
Last Updated: Sunday November 06, 2011
Last Change : Sunday November 06, 2011
Last Updated: Monday February 06, 2012
Last Change : Wednesday February 01, 2012
<DIV CLASS="toc">

Expand Down Expand Up @@ -1753,7 +1753,7 @@ <H2>5.2. Install development frameworks for QGIS dependencies</H2>
William provides an additional installer package for Postgresql (for PostGIS
support). Qgis just needs the libpq client library, so unless you want to
support). QGIS just needs the libpq client library, so unless you want to
setup the full Postgres + PostGIS server, all you need is the client-only
package. It's available here:
Expand All @@ -1772,7 +1772,7 @@ <H3>5.2.1. Additional Dependencies: General compatibility note</H3>
There are some additional dependencies that, at the time of writing, are not
provided as frameworks or installers so we will need to build these from source.
If you are wanting to build Qgis as a 64-bit application, you will need to
If you are wanting to build QGIS as a 64-bit application, you will need to
provide the appropriate build commands to produce 64-bit support in dependencies.
Likewise, for 32-bit support on Snow Leopard, you will need to override the
default system architecture, which is 64-bit, according to instructions for
Expand Down Expand Up @@ -2001,7 +2001,7 @@ <H3>5.2.6. Additional Dependencies: Qwt/PyQwt</H3>
Double-click the tarball to unpack it. The following assumes PyQwt v5.2.0
(comes with Qwt 5.2.1). Normal compilation does both Qwt and PyQwt at the same
time, but Qwt is statically linked into PyQwt, and Qgis can't use it. So, we
time, but Qwt is statically linked into PyQwt, and QGIS can't use it. So, we
need to split the build.
Expand Down Expand Up @@ -2155,7 +2155,7 @@ <H2>5.5. Configure the build</H2>
Or, to use a Unix-style build of GRASS, use the following cmake invocation
(minimum GRASS version as stated in the Qgis requirements, substitute the GRASS
(minimum GRASS version as stated in the QGIS requirements, substitute the GRASS
path and version as required):

Expand Down Expand Up @@ -2194,7 +2194,7 @@ <H2>5.5. Configure the build</H2>

The Qgis Mapserver feature requires fastcgi support. This is included in
The QGIS Mapserver feature requires fastcgi support. This is included in
Leopard and Snow Leopard, but was dropped at Lion. To build the Mapserver
component on Leopard and Snow, add the followling line before the last line in
the above configuration:
Expand All @@ -2210,9 +2210,9 @@ <H2>5.5. Configure the build</H2>
<U>Bundling note:</U> Older Qt versions may have problems with some Qt plugins and
Qgis. The way to handle this is to bundle Qt inside the Qgis application. You
can do this now or wait to see if there are immediate crashes when running Qgis.
It's also a good idea to bundle Qt if you need to copy Qgis to other Macs (where
QGIS. The way to handle this is to bundle Qt inside the QGIS application. You
can do this now or wait to see if there are immediate crashes when running QGIS.
It's also a good idea to bundle Qt if you need to copy QGIS to other Macs (where
you would have to install Xcode just so Qt would install!).
Expand Down Expand Up @@ -2311,5 +2311,5 @@ <H1>6. Authors and Acknowledgments</H1>

<!-- html code generated by txt2tags 2.6 ( -->
<!-- cmdline: txt2tags -t html -o INSTALL.html INSTALL.t2t -->
<!-- cmdline: txt2tags -o INSTALL.html -t html INSTALL.t2t -->
27 changes: 27 additions & 0 deletions resources/context_help/HeatmapGui-en_US
@@ -0,0 +1,27 @@
<h1>Heatmap Plugin Help</h1>
<p>Heatmap Plugin creates a heatmap raster for the input point vector layer. The heatmap is generated based on the number of points in a given location. The higher the number of points, the higher will be the corresponding pixel(s) value in the raster.</p>

<h2>The Dialog Parameters</h2>

<h3>Input Point Vector</h3>
<p>The input is always a vector layer of point type. All the point vector layers that are currently loaded in the window are automatically populated in the input layer drop-down list. Click the Dropdown button and select the required layer.</p>

<h3>Output Ratser</h3>
<p>The output raster location and filename can be set by clicking the <label>...</label> button next to the output raster textbox.<br/>
<b>Note:</b>The file format is automatically added depending upon the output format selected, if not explicitly given.</p>

<h3>Output Format</h3>
<p>All the file creation supporting GDAL formats are available in the drop down list. Click and select the required output format for your file.<br/>
<b>Note:</b> GeoTiff and ERDAS Imagine .img formats are recommended. Some formats makes the application crash. Kindly stick to the recommended formats until the crash issue is resolved or Use other formats if you know about its GDAL support completely.</p>

<h3>Heatmap Point Attributes</h3>
<h4>Buffer Radius</h4>
<p>The buffer radius specifies the number of <b>pixels or cells</b> around a point where the heat(influence) of the point will be felt. Smaller values give you clear distinction between points and bigger values gives you nicely merged heatmap regions. This is the spatial parameter of the heat region of a point.<br/>
<b>Note:</b> The value is always a whole number.</p>
<h4>Decay Ratio</h4>
<p>The decay ratio defines amount of heat(influence) that should reach the outermost pixel in the Buffer Radius. It is the direct measure of the outer most value.<br/>
<b>Example:</b> If Buffer Ratio is set as 0 and Radius as 10, then the centre pixel of a point will have value and the pixel away by a distance of 10 units will have the value 0, a pixel which is 5 units away will have a value of 0.5 and so on. Here distance is measure not by pixel count rather using sqrt( xOffset^2 + yOffset^2 ), so you always get a circular heat region.</p>

<h2>Further Details</h2>
<p>Contact the author through aruntheguy at gmail dot com</p>

2 changes: 2 additions & 0 deletions src/plugins/CMakeLists.txt
Expand Up @@ -37,3 +37,5 @@ IF (WITH_GLOBE)

# headers installed in qgis_core target

SUBDIRS (heatmap)
53 changes: 53 additions & 0 deletions src/plugins/heatmap/CMakeLists.txt
@@ -0,0 +1,53 @@

# Files

SET (heatmap_SRCS

SET (heatmap_UIS heatmapguibase.ui)

SET (heatmap_MOC_HDRS

SET (heatmap_RCCS heatmap.qrc)

# Build

QT4_WRAP_UI (heatmap_UIS_H ${heatmap_UIS})

QT4_WRAP_CPP (heatmap_MOC_SRCS ${heatmap_MOC_HDRS})

QT4_ADD_RESOURCES(heatmap_RCC_SRCS ${heatmap_RCCS})

ADD_LIBRARY (heatmapplugin MODULE ${heatmap_SRCS} ${heatmap_MOC_SRCS} ${heatmap_RCC_SRCS} ${heatmap_UIS_H})



# Install

INSTALL(TARGETS heatmapplugin

97 changes: 97 additions & 0 deletions src/plugins/heatmap/README
@@ -0,0 +1,97 @@
Welcome to your automatically generated plugin!

This is just a starting point. You now need to modify the code to make it do
something on for a more information to get yourself started.


You really need to read the QGIS API Documentation now at:

In particular look at the following classes:

QGisInterface :
QgsMapCanvas :
QgsMapTool :
QgisPlugin :

QGisInterface is an abstract base class (ABC) that specifies what publicly
available features of QGIS are exposed to third party code and plugins. An
instance of the QgisInterface is passed to the plugin when it loads. Please
consult the QGIS development team if there is functionality required in the
QGisInterface that is not available.

QgsPlugin is an ABC that defines required behaviour your plugin must provide.
See below for more details.

What are all the files in my generated plugin directory for?

This is the generated CMake file that builds the plugin. You should add you
application specific dependencies and source files to this file.

This is the class that provides the 'glue' between your custom application
logic and the QGIS application. You will see that a number of methods are
already implemented for you - including some examples of how to add a raster or
vector layer to the main application map canvas. This class is a concrete
implementation of QgisPlugin (which defines required behaviour for a plugin).
In particular, a plugin has a number of static methods and members so that the
QgsPluginManager and plugin loader logic can identify each plugin, create an
appropriate menu entry for it etc. Note there is nothing stopping you creating
multiple toolbar icons and menu entries for a single plugin. By default though
a single menu entry and toolbar button is created and its pre-configured to
call the run() method in this class when selected. This default implementation
provided for you by the plugin builder is well documented, so please refer to
the code for further advice.

This is a Qt designer 'ui' file. It defines the look of the default plugin
dialog without implementing any application logic. You can modify this form to
suite your needs or completely remove it if your plugin does not need to
display a user form (e.g. for custom MapTools).

This is the concrete class where application logic for the above mentioned
dialog should go. The world is your oyster here really....

This is the Qt4 resources file for your plugin. The Makefile generated for your
plugin is all set up to compile the resource file so all you need to do is add
your additional icons etc using the simple xml file format. Note the namespace
used for all your resources e.g. (":/Heatmap/"). It is important to use
this prefix for all your resources. We suggest you include any other images and
run time data in this resurce file too.

This is the icon that will be used for your plugin menu entry and toolbar icon.
Simply replace this icon with your own icon to make your plugin disctinctive
from the rest.

This file contains the documentation you are reading now!

Getting developer help:

For Questions and Comments regarding the plugin builder template and creating
your features in QGIS using the plugin interface please contact us via:

* the QGIS developers mailing list, or
* IRC (#qgis on

QGIS is distributed under the Gnu Public License. If you create a useful plugin
please consider contributing it back to the community.

Have fun and thank you for choosing QGIS.

The QGIS Team

0 comments on commit 03fd388

Please sign in to comment.