[mapserver-users] Heatmap / choropleth from points

Tom van der Putte tom at vdputte.nl
Wed Feb 23 11:08:41 EST 2011


Hi
Daniel,
 So if I undestand correctly you want to display you points and the
colour the areas around them according to the nearest point (1), or if
possible make a continous interpolated map that shows the gradients
(2)?
 OK, this is not in the MapServer-topic, because MapServer has no way
to do this. So I suggest we move this conversation private, but I'll
try to give you an answer for future reference. If you have any
questions, mail me directly.
 If this is indeed as you say non-dynamic, things are easy; with any
respectable GIS package, you can create option (1) by making a Voronoi
diagram. This makes polygons around yout points in which every
location in its interior of the polygon is closer to its center point
than it is to other points. The result is a vector image (shapefile).
 To create option (2) you have to interpolate these points into a
(continuous) raster through any interpolation method. Simplest is
nearest neighbour which in essence creates a Voronoi Diagram in raster
 format. If you want to go more pro, there is Inverse Distance
Weighted (which I do not encourage people using because the options
have huge influence on the outcome and are note really exact). Then
there is Kriging, but you need to be into statistics quite a bit to be
able to get a good outcome -- if not, leave it alone. Then there is
also Natural Neighbour interpolation, which uses a Voronoi Diagram as
its basis, and is thus quite well suited for using points that are
anisotropically distributed, and when kriging is not an option.
 If you do want these things programatically, there are a couple of
python scripts I have that you could use for create Nearest Neighbour
and Natural Neighbour interpolations. You will need to adjust those
quite a bit.
 Tom

-----------------------------------------------------------------------
  Date: Wed, 23 Feb 2011 04:56:43 -0800 (PST)
 From: Josh Jordan 
 Subject: Re: [mapserver-users] Heatmap / choropleth from points
 attributes
 To: Daniel Cole 
 Cc: mapserver-users at lists.osgeo.org [3]
 Message-ID: 
 Content-Type: text/plain; charset="iso-8859-1"
 First, you have to turn your points into shapes, theres some
algorithm that will turn points into polygons with borders midway
between each point. 
 CLASS
 If your CSV data isnt joined to the mapserver data, you have to
calculate what shapes are in each bucket like this-
 CLASS
 --- On Tue, 2/22/11, Daniel Cole  wrote:
 From: Daniel Cole 
 Subject: [mapserver-users] Heatmap / choropleth from points
attributes
 To: mapserver-users at lists.osgeo.org [7]
 Date: Tuesday, February 22, 2011, 10:06 PM
 I am a new mapserver user and have spent countless hours over the
last month reading, trying code, etc. before posting here for help. 
 I found some python code that I thought might do the trick , but it
seems lots of heat maps are based off of how many points exist in a
certain area, and thats now what I am doing. 
 My points contain numbers in the attributes, 5, 25, 92, 71, etc. 
 Thanks,
 Daniel
 -----Inline Attachment Follows-----
 _______________________________________________
 mapserver-users mailing list
 mapserver-users at lists.osgeo.org [8]
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
 -------------- next part --------------
 An HTML attachment was scrubbed...
 URL:
http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110223/fe139556/attachment-0001.html
 ------------------------------
 

Links:
------
[1] mailto:outerspaceman81 at yahoo.com
[2] mailto:daniel at southernsolutionsms.com
[3] mailto:mapserver-users at lists.osgeo.org
[4] mailto:428818.75172.qm at web111314.mail.gq1.yahoo.com
[5] mailto:daniel at southernsolutionsms.com
[6] mailto:daniel at southernsolutionsms.com
[7] mailto:mapserver-users at lists.osgeo.org
[8] mailto:mapserver-users at lists.osgeo.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110223/4a812e05/attachment-0001.html


More information about the mapserver-users mailing list