[OSM-talk] Finding a poly around set of points

Dan Putler dan.putler at sauder.ubc.ca
Sat Apr 17 01:39:47 BST 2010


Hi Lasse,

I don't know if this what you want, but you can take the convex hull of
the set of points to get polygons. Do a good search on "convex hull
javascript", and you will run into several things that will likely work.

Dan

On Fri, 2010-04-16 at 17:22 -0700, Lasse Luttermann wrote:
> Hi list.
> 
> I am working on a little project where I've got a database containing 
> groupings of Lon-Lat pairs and I'm trying to find a good way to find the 
> outer bounds of the area where the points is in. Since the points is 
> often placed in an oblong square going diagonal (eg from SW to NE) a 
> polygon is needed. A square would simply cover too much space around the 
> area that needs to be highlighted.
> It is for use with OpenLayers so some genius javascript solution would 
> be nice!
> 
> - Lasse.
> 
-- 
Dan Putler
Sauder School of Business
University of British Columbia





More information about the talk mailing list