First, you have to turn your points into shapes, theres some algorithm that 
will turn points into polygons with borders midway between each point.  Then, 
you have to add classes to the mapfile.  Add one class per color.  You have to 
calculate the bounds and color for each class like this:
CLASS    EXPRESSION(([POPULATION] gt 90457) AND ([POPULATION] le 108397))    
STYLE      COLOR 10 20 50    ENDEND
If your CSV data isnt joined to the mapserver data, you have to calculate what 
shapes are in each bucket like this-
CLASS    EXPRESSION(([NAME] = "Shape1") OR ([NAME] = "Shape2"))    STYLE      
COLOR 10 20 50    ENDEND
--- On Tue, 2/22/11, Daniel Cole <dan...@southernsolutionsms.com> wrote:

From: Daniel Cole <dan...@southernsolutionsms.com>
Subject: [mapserver-users] Heatmap / choropleth from points attributes
To: mapserver-users@lists.osgeo.org
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 am trying to 
generate an image (non-interactive) on a webpage based off of attribute data in 
a points file.  For example, 20 different points equally distributed in a field 
contain data about the moister level of the soil.  I want to make the lowest 
levels blue and the highest levels yellow, or something like that with some 
gradients in between.  If possible I want it to have interpolated data between 
them to show the gradual change, but that isn't a must.   I also want to wrap 
it in a polygon that trims the edges.  

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.   I feel like 
I am missing some easy way to do this right in front of me with gdal or 
something.  If someone has any direction or even demo code that would be 
greatly appreciated.  

Thanks,

Daniel

-----Inline Attachment Follows-----

_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users



      
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to