[postgis-users] ST_SquareGrid for known extent

David Galt davidlgalt.gis+qlist at gmail.com
Thu Jun 10 16:21:07 PDT 2021


Kinda. I was hoping to be able to use the st_SquareGrid and st_ HexagonGrid
functions. Something along the lines of

SELECT 0 as OGC_FID, hex.geom
FROM (SELECT * from st_makeenvelope(-9585017.66383462, 4580013.332495567,
-9498173.412746038, 4638341.318989425, 3857) ) geom)) env
CROSS JOIN ST_HexagonGrid(1609.344, env.geom) AS hex
WHERE ST_Intersects(env.geom, hex.geom)

On Thu, Jun 10, 2021 at 3:31 PM Simon Greener <simon at spdba.com.au> wrote:

> David,
>
> Are you after something like this?
>
>
> https://www.spdba.com.au/generating-a-grid-fishnet-of-points-or-polygons-for-postgis
> /
>
> Simon
>
> Get BlueMail for Android <http://www.bluemail.me/r?b=16696>
> On 11 Jun 2021, at 06:34, David Galt <davidlgalt.gis+qlist at gmail.com>
> wrote:
>>
>> Hi all,
>> I'm sure this is simple, but I have not found the answer. I'd like to use
>> the ST_SquareGrid function to create a grid not based on another layer but
>> on a known envelope.
>>
>> e.g. st_makeenvelope(-9585017.66383462, 4580013.332495567,
>> -9498173.412746038, 4638341.318989425, 3857)
>>
>> How would I code this?
>>
>> David Galt
>>
>> ------------------------------
>>
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/postgis-users
>>
>> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20210610/76dc3e36/attachment.html>


More information about the postgis-users mailing list