[postgis-users] create 1 cell/polygon per point inside bounding polygon

pcreso at pcreso.com pcreso at pcreso.com
Sat Sep 8 20:30:24 PDT 2012

Hi Daniel,

Do you want regular cells or polygons?

There are a few approaches for generating voronoi polygons in Postgis:


If your points already represent the centre of cells, then a fishnet approach would work, generate a mesh to match the grid, then do a spatial join on points inside cells to generate the match. You just need to know the extent & size of the grid:



   Brent Wood

--- On Sun, 9/9/12, Daniel Cole <daniel at southernsolutionsms.com> wrote:

From: Daniel Cole <daniel at southernsolutionsms.com>
Subject: [postgis-users] create 1 cell/polygon per point inside bounding polygon
To: postgis-users at postgis.refractions.net
Date: Sunday, September 9, 2012, 3:02 PM

I want to be able to take a polygon that has 3 to 50 points inside of it and create polygon where each point is the only point inside of it a cell and it is located at the centroid, or at least close. The points are already in a sort of grid shape, so want my cells as uniform size as possible although I assume the cells containing the outer-most points may be larger or smaller.  Any cell on the outer edges will be clipped by the original bounding polygon.  

I  thought that I might could use something like fishnetting, but I want to be sure that there are just the same number of cells are there are points.  
I have attached an image that I made using the nearest neighbor algorithm and I think and the look is basically what I wanting to do, but where you see the color there, there would be a cell unique to that point. If anyone knew anway to reverse that raster into cells that would help too.  thanks. 

any thoughts?
-----------------------------------------------------------Daniel Cole

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

postgis-users mailing list
postgis-users at postgis.refractions.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120908/f0990de5/attachment.html>

More information about the postgis-users mailing list