[postgis-users] making Hexagoan from coordinate x, y and using distance

Mike Toews mwtoews at gmail.com
Fri Dec 6 00:35:06 PST 2013


Oh bummer! I just re-read your hexagon requirement. I must have
misread octa- somewhere. Hexa- is not possible with the buffer hack
(since hexa- is not divisible by octa-). You will need to define a
template hexagon, then use some affine transform parameters to
translate/scale it to the correct place. This function sort-of does
it:

http://trac.osgeo.org/postgis/wiki/UsersWikiGenerateHexagonalGrid

although the base hexagon looks a bit odd...

-Mike

On 6 December 2013 19:04, anurag singh <anurag.gsdl at gmail.com> wrote:
> Hi everyone!!!!!
>
> This is my first question on this site. I am developing a small application
> where there is a requirement for generating a buffer in form of regular
> hexagon.
> I have already created the circle using ST_Buffer(ST_MakePoint("x1"," y1"),
> 1000, 4 )  but not getting that how i can create a regular hexagon. I am
> stuck on this point
> please help me .
>
>
> --
> Thank's & Regard's
> Anurag Singh
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users


More information about the postgis-users mailing list