<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi Daniel,<br><br>Do you want regular cells or polygons?<br><br>There are a few approaches for generating voronoi polygons in Postgis:<br><br>eg:<br><a href="http://www.bostongis.com/PrinterFriendly.aspx?content_name=postgresql_plr_tut02">http://www.bostongis.com/PrinterFriendly.aspx?content_name=postgresql_plr_tut02</a><br><a href="http://geogeek.garnix.org/2012/04/faster-voronoi-diagrams-in-postgis.html">http://geogeek.garnix.org/2012/04/faster-voronoi-diagrams-in-postgis.html</a><br><br>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:<br><br><a
 href="http://trac.osgeo.org/postgis/wiki/UsersWikiCreateFishnet">http://trac.osgeo.org/postgis/wiki/UsersWikiCreateFishnet</a><br><br><br>HTH,<br><br>   Brent Wood<br><br>--- On <b>Sun, 9/9/12, Daniel Cole <i><daniel@southernsolutionsms.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Daniel Cole <daniel@southernsolutionsms.com><br>Subject: [postgis-users] create 1 cell/polygon per point inside bounding polygon<br>To: postgis-users@postgis.refractions.net<br>Date: Sunday, September 9, 2012, 3:02 PM<br><br><div id="yiv818782492"><div><br></div><div>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.  </div>

<div><br></div><div>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.  </div><div><br></div><div>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. </div>

<div><br></div><div>any thoughts?</div><div><br></div><div>DC</div><div><br></div>-----------------------------------------------------------<div>Daniel Cole</div><br>
</div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br>postgis-users mailing list<br><a ymailto="mailto:postgis-users@postgis.refractions.net" href="/mc/compose?to=postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br></div></blockquote></td></tr></table>