Skip to content

Commit 03fd388

Browse files
committed
Merged in Arunmozhi's heatmap plugin into QGIS core
1 parent bc43fdd commit 03fd388

File tree

14 files changed

+1268
-15
lines changed

14 files changed

+1268
-15
lines changed

INSTALL

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Quantum GIS (QGIS)
22
Building QGIS from source - step by step
3-
Tuesday December 27, 2011
3+
Monday February 06, 2012
44

55

6-
Last Updated: Tuesday December 27, 2011
7-
Last Change : Tuesday December 27, 2011
6+
Last Updated: Monday February 06, 2012
7+
Last Change : Wednesday February 01, 2012
88

99

1010
1. Introduction

doc/INSTALL.html

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@
8080
<DIV CLASS="header" ID="header">
8181
<H1>Quantum GIS (QGIS)</H1>
8282
<H2>Building QGIS from source - step by step</H2>
83-
<H3>Sunday November 06, 2011</H3>
83+
<H3>Monday February 06, 2012</H3>
8484
</DIV>
8585

8686
<DIV CLASS="body" ID="body">
8787
<P>
88-
Last Updated: Sunday November 06, 2011
89-
Last Change : Sunday November 06, 2011
88+
Last Updated: Monday February 06, 2012
89+
Last Change : Wednesday February 01, 2012
9090
</P>
9191
<DIV CLASS="toc">
9292

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

@@ -2194,7 +2194,7 @@ <H2>5.5. Configure the build</H2>
21942194
</PRE></div>
21952195

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

23122312
</DIV>
23132313
<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
2314-
<!-- cmdline: txt2tags -t html -o INSTALL.html INSTALL.t2t -->
2314+
<!-- cmdline: txt2tags -o INSTALL.html -t html INSTALL.t2t -->
23152315
</BODY></HTML>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<h1>Heatmap Plugin Help</h1>
2+
<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>
3+
4+
<h2>The Dialog Parameters</h2>
5+
6+
<h3>Input Point Vector</h3>
7+
<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>
8+
9+
<h3>Output Ratser</h3>
10+
<p>The output raster location and filename can be set by clicking the <label>...</label> button next to the output raster textbox.<br/>
11+
<b>Note:</b>The file format is automatically added depending upon the output format selected, if not explicitly given.</p>
12+
13+
<h3>Output Format</h3>
14+
<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/>
15+
<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>
16+
17+
<h3>Heatmap Point Attributes</h3>
18+
<h4>Buffer Radius</h4>
19+
<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/>
20+
<b>Note:</b> The value is always a whole number.</p>
21+
<h4>Decay Ratio</h4>
22+
<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/>
23+
<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>
24+
25+
<h2>Further Details</h2>
26+
<p>Contact the author through aruntheguy at gmail dot com</p>
27+

src/plugins/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,5 @@ IF (WITH_GLOBE)
3737
ENDIF (WITH_GLOBE)
3838

3939
# headers installed in qgis_core target
40+
41+
SUBDIRS (heatmap)

src/plugins/heatmap/CMakeLists.txt

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
2+
########################################################
3+
# Files
4+
5+
SET (heatmap_SRCS
6+
heatmap.cpp
7+
heatmapgui.cpp
8+
)
9+
10+
SET (heatmap_UIS heatmapguibase.ui)
11+
12+
SET (heatmap_MOC_HDRS
13+
heatmap.h
14+
heatmapgui.h
15+
)
16+
17+
SET (heatmap_RCCS heatmap.qrc)
18+
19+
########################################################
20+
# Build
21+
22+
QT4_WRAP_UI (heatmap_UIS_H ${heatmap_UIS})
23+
24+
QT4_WRAP_CPP (heatmap_MOC_SRCS ${heatmap_MOC_HDRS})
25+
26+
QT4_ADD_RESOURCES(heatmap_RCC_SRCS ${heatmap_RCCS})
27+
28+
ADD_LIBRARY (heatmapplugin MODULE ${heatmap_SRCS} ${heatmap_MOC_SRCS} ${heatmap_RCC_SRCS} ${heatmap_UIS_H})
29+
30+
INCLUDE_DIRECTORIES(
31+
${CMAKE_CURRENT_BINARY_DIR}
32+
${GEOS_INCLUDE_DIR}
33+
${GDAL_INCLUDE_DIR}
34+
../../core
35+
../../core/raster
36+
../../gui
37+
../../analysis/raster
38+
..
39+
)
40+
41+
TARGET_LINK_LIBRARIES(heatmapplugin
42+
qgis_core
43+
qgis_gui
44+
)
45+
46+
47+
########################################################
48+
# Install
49+
50+
INSTALL(TARGETS heatmapplugin
51+
RUNTIME DESTINATION ${QGIS_PLUGIN_DIR}
52+
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR})
53+

src/plugins/heatmap/README

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
Welcome to your automatically generated plugin!
2+
-------------------------------------------------------------
3+
4+
This is just a starting point. You now need to modify the code to make it do
5+
something useful....read on for a more information to get yourself started.
6+
7+
Documentation:
8+
-------------------------------------------------------------
9+
10+
You really need to read the QGIS API Documentation now at:
11+
12+
http://qgis.org/api/
13+
14+
In particular look at the following classes:
15+
16+
QGisInterface : http://qgis.org/api/classQgisInterface.html
17+
QgsMapCanvas : http://qgis.org/api/classQgsMapCanvas.html
18+
QgsMapTool : http://qgis.org/api/classQgsMapTool.html
19+
QgisPlugin : http://qgis.org/api/classQgisPlugin.html
20+
21+
QGisInterface is an abstract base class (ABC) that specifies what publicly
22+
available features of QGIS are exposed to third party code and plugins. An
23+
instance of the QgisInterface is passed to the plugin when it loads. Please
24+
consult the QGIS development team if there is functionality required in the
25+
QGisInterface that is not available.
26+
27+
QgsPlugin is an ABC that defines required behaviour your plugin must provide.
28+
See below for more details.
29+
30+
What are all the files in my generated plugin directory for?
31+
-------------------------------------------------------------
32+
33+
CMakeLists.txt
34+
This is the generated CMake file that builds the plugin. You should add you
35+
application specific dependencies and source files to this file.
36+
37+
heatmap.h
38+
heatmap.cpp
39+
This is the class that provides the 'glue' between your custom application
40+
logic and the QGIS application. You will see that a number of methods are
41+
already implemented for you - including some examples of how to add a raster or
42+
vector layer to the main application map canvas. This class is a concrete
43+
implementation of QgisPlugin (which defines required behaviour for a plugin).
44+
In particular, a plugin has a number of static methods and members so that the
45+
QgsPluginManager and plugin loader logic can identify each plugin, create an
46+
appropriate menu entry for it etc. Note there is nothing stopping you creating
47+
multiple toolbar icons and menu entries for a single plugin. By default though
48+
a single menu entry and toolbar button is created and its pre-configured to
49+
call the run() method in this class when selected. This default implementation
50+
provided for you by the plugin builder is well documented, so please refer to
51+
the code for further advice.
52+
53+
heatmapgui.ui
54+
This is a Qt designer 'ui' file. It defines the look of the default plugin
55+
dialog without implementing any application logic. You can modify this form to
56+
suite your needs or completely remove it if your plugin does not need to
57+
display a user form (e.g. for custom MapTools).
58+
59+
60+
heatmapgui.cpp
61+
heatmapgui.h
62+
This is the concrete class where application logic for the above mentioned
63+
dialog should go. The world is your oyster here really....
64+
65+
heatmap.qrc
66+
This is the Qt4 resources file for your plugin. The Makefile generated for your
67+
plugin is all set up to compile the resource file so all you need to do is add
68+
your additional icons etc using the simple xml file format. Note the namespace
69+
used for all your resources e.g. (":/Heatmap/"). It is important to use
70+
this prefix for all your resources. We suggest you include any other images and
71+
run time data in this resurce file too.
72+
73+
heatmap.png
74+
This is the icon that will be used for your plugin menu entry and toolbar icon.
75+
Simply replace this icon with your own icon to make your plugin disctinctive
76+
from the rest.
77+
78+
README
79+
This file contains the documentation you are reading now!
80+
81+
82+
Getting developer help:
83+
-------------------------------------------------------------
84+
85+
For Questions and Comments regarding the plugin builder template and creating
86+
your features in QGIS using the plugin interface please contact us via:
87+
88+
* the QGIS developers mailing list, or
89+
* IRC (#qgis on freenode.net)
90+
91+
QGIS is distributed under the Gnu Public License. If you create a useful plugin
92+
please consider contributing it back to the community.
93+
94+
Have fun and thank you for choosing QGIS.
95+
96+
The QGIS Team
97+
2007

0 commit comments

Comments
 (0)