Visualizing Point Data

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Fri Feb 3 10:19:48 EST 2006


On Feb 3, 2006, at 12:06 AM, Bill Binko wrote:

> Hi everyone,
> 
> I posted a fairly specific question to the GDAL-dev list (and more
> on IRC)
> the other day, asking for input on how to do Kernel Density mapping
> using an OGR data source and sending the raster back through GDAL to
> be displayed through Mapserver.
> 
> I got some good responses, one of which was: are you sure that's
> what you want?  Well, to be honest, I don't know.  So I'm posting a
> more  general question here, hoping that someone in this larger
> audience has  solved the problem I'm facing.
> 
> What I'm trying to do is visualize point data (stored in PostGIS,
> but that
> can change) so that users can determine where the points are concentrated,
> even while zoomed out.  One caveat is that the points can be
> coincident (identical Lat/Long).
> 
> For example, I'd use this with include recent real estate sales data
> - condos in the same building have the same shape, but both sales
> should count.  Similarly, in a customer counting scenario, two
> customers with the
> same address (even only to the building level) will geocode to the
> same lat/long.
> 
> When Mapserver serves up Point layers directly, the results can be
> quite disappointing (and misleading).  In Mapserver, the last Point
> to be  drawn on any spot will just hide the previous points, often
> hiding  multiple data
> points.
> 
> Similarly, when you zoom out on a point diagram, there are two
> options: either you set the symbol to have a max size (so that
> eventually, they become "less than clear"), or you keep the symbol
> size constant, eventually obliterating the background with huge blobs
> of overlapping points.
> 
> When I tried to tackle this problem, I turned to a Real Estate
> Geography book I have (written by professor Thrall at my alma mater) 
> http://www.amazon.com/gp/product/0195076362/sr=1-2/qid=1138949940/ref=sr_1_2/104-4827941-6490312?%5Fencoding=UTF8
> 
> There, he is discussing Site Selection and Customer Spotting methods,
>  and he discusses the Kernel Density method of generating a surface
> map showing where the customers live.  The discussion is brief, but
> the  GDAL folks pointed me to two tools (parts of R and GRASS
> respectively) that can
> take points and generate kernel surfaces.  With some magic, contour
> maps, and other visualizations could be pushed through GDAL and into
> Mapserver.
> 
> However, with further inspection, these methods all work on distance 
> between customers, which causes a problem with coincident points.

Bill,

I'm assuming this probably is a problem because the algorithm divides by 
the distance causing a divide by zero. If you can detect the coincident 
points you could randomly add some noise to their locations so they are 
not mathematically coincident and then the clustering would be reflected 
in the Kernel Density.

Another idea would be to remove the coincident points and replace them 
with a single point with an attribute of how many points were at that 
location. Then see if it is possible to modify the Kernel Density 
algorithm to use the attributed clustering to modify its output. Or do 
the kernel density and overlay it with symbols reflecting the multiple 
points. So your would get a kernel density raster with varying radius 
dots reflecting the coincident points where the radius reflect the 
number of points.

I think the former is a better way to go, and you can adjust the noise 
value to get results that reflect what you are trying to show.

Anyway some additional ideas to think about.

-Steve W.

> I am thinking that this problem must have been solved by someone  out
> in this audience, so at this point, I'm very open to suggestions.
> 
> I am very willing (and fairly able) to implement any custom  software
> the solution my require.  I have considered filters between GDAL and
> OGR, or stand alone processing that generates the needed data.  I'm
> also very happy to feed it back to the community, if there's
> interest.
> 
> (So, basically, I will trade working code for modeling/GIS/statistics
>  knowledge if anyone's interested  :)
> 
> Thanks,
> 
> Bill



More information about the mapserver-users mailing list