<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">First, you have to turn your points into shapes, theres some algorithm that will turn points into polygons with borders midway between each point. &nbsp;Then, you have to add classes to the mapfile. &nbsp;Add one class per color. &nbsp;You have to calculate the bounds and color for each class like this:<div><br><div><div>CLASS</div><div>&nbsp;&nbsp; &nbsp;EXPRESSION(([POPULATION] gt 90457) AND ([POPULATION] le 108397))</div><div>&nbsp;&nbsp; &nbsp;STYLE</div><div>&nbsp;&nbsp; &nbsp; &nbsp;COLOR 10 20 50</div><div>&nbsp;&nbsp; &nbsp;END</div><div>END</div><div><br></div><div>If your CSV data isnt joined to the mapserver data, you have to calculate what shapes are in each bucket like this-</div><div><br></div><div><div>CLASS</div><div>&nbsp;&nbsp; &nbsp;EXPRESSION(([NAME] = "Shape1") OR ([NAME] = "Shape2"))</div><div>&nbsp;&nbsp;
 &nbsp;STYLE</div><div>&nbsp;&nbsp; &nbsp; &nbsp;COLOR 10 20 50</div><div>&nbsp;&nbsp; &nbsp;END</div><div>END</div></div><br>--- On <b>Tue, 2/22/11, Daniel Cole <i>&lt;daniel@southernsolutionsms.com&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Daniel Cole &lt;daniel@southernsolutionsms.com&gt;<br>Subject: [mapserver-users] Heatmap / choropleth from points attributes<br>To: mapserver-users@lists.osgeo.org<br>Date: Tuesday, February 22, 2011, 10:06 PM<br><br><div id="yiv2019315080"><div>I am a new mapserver user and have spent countless hours over the last month reading, trying code, etc. before posting here for help. &nbsp;I am trying to generate an image&nbsp;(non-interactive)&nbsp;on a webpage based off of attribute data in a points file. &nbsp;For example, 20 different points equally distributed in a field contain data about the moister level of the soil. &nbsp;I want
 to make the lowest levels blue and the highest levels yellow, or something like that with some gradients in between. &nbsp;If possible I want it to have interpolated data between them to show the gradual change, but that isn't a must. &nbsp; I also want to wrap it in a polygon that trims the edges. &nbsp;</div>
<div><br></div><div>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. &nbsp;</div><div><br></div>
<div>My points contain numbers in the attributes, 5, 25, 92, 71, etc. &nbsp; I feel like I am missing some easy way to do this right in front of me with gdal or something. &nbsp;If someone has any direction or even demo code that would be greatly appreciated. &nbsp;</div>
<div><br></div><div>Thanks,<br><br>Daniel</div>
</div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br>mapserver-users mailing list<br><a ymailto="mailto:mapserver-users@lists.osgeo.org" href="/mc/compose?to=mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></div></blockquote></div></div></td></tr></table><br>