[postgis-users] N-Point Buffer

strk at refractions.net strk at refractions.net
Wed Dec 21 00:47:32 PST 2005


On Wed, Dec 21, 2005 at 09:37:59AM +0100, Stefano B. wrote:
> Hi,
> 
> I have different set of points on my map. I'd like to create a buffer (poligon) for each set (in order to display different "background areas" for each set).
> 
> So, how can I create a "buffer area" for a set of points?
> The first idea:
> 
>     - find the poligon that contains this points (1)
>     - create a buffer of this poligon (2)
> 
> (1) it seems, to me,  difficult (or not?)
> (2) ...
> 
> if is it the right way to do this, how can I find the polygon?
> if it is the wrong way, what is the best method to to this?

This is just an idea:

	1) Build a multipoint and find it's centroid [C] (Collect, Centroid)
	2) Order points by azimuth from [C] (Azimuth)
	3) Build a line using ordered points (MakeLine)
	4) Close the line (AddPoint, PointN)
	5) Build a polygon (MakePolygon)
	6) Buffer

Sounds like possible with a single query ...

--strk;




More information about the postgis-users mailing list