[postgis-users] Cut extent box2d into small regular boxes, and iterate through each box of features

Shaozhong SHI shishaozhong at gmail.com
Tue Mar 29 01:42:18 PDT 2022


Hi, Lars,

It appears that the key issue is number of features in each grid.  That is
why you used contect-based_grid.

If that is the key issue, logic can be built to count the number of rows
obtained for each grid.  If the count is greater than a threshold, further
break down can be achieved with the same function.

This is to anticipate the growth of data over time.

Is that correct?

Regards,

David

On Mon, 28 Mar 2022 at 07:49, Lars Aksel Opsahl <Lars.Opsahl at nibio.no>
wrote:

>
>
> ------------------------------
> >From: postgis-users <postgis-users-bounces at lists.osgeo.org> on behalf of
> Mike Taves <mwtoews at gmail.com>Sent: Sunday, March 27, 2022 10:31 PMTo:
> PostGIS Users Discussion <postgis-users at lists.osgeo.org>Subject: Re:
> [postgis-users] Cut extent box2d into small regular boxes, and iterate
> through each box of features
> >
> >On Sat, 26 Mar 2022 at 02:44, Shaozhong SHI <shishaozhong at gmail.com>
> wrote:
> >> Is there a procedure to get a box2d for the extent of features?
> >> Divide the box into smaller regular boxes
> >> loop carry out geospatial operation in each box
> >
> >A few ideas to generate the small regular boxes, see:
> >- https://postgis.net/docs/ST_SquareGrid.html
> >- https://gis.stackexchange.com/q/16374/
> >
> Hi
>
> We use a lot of grids, but we have seen that using content to influence
> each grid cell size is more important than having regular sized grid cell.
> For instance, smaller cell's where it's high density of polygons and larger
> cell in other areas. When grid cells are "equal" related to content (and
> not spatial size) it also easier to run thing parallel without running into
> memory problems and so on.
>
> Here is some sample code https://github.com/larsop/content_balanced_grid
> to create grids and here some code where we use such a grid
> https://github.com/larsop/find-overlap-and-gap .
>
> Lars
>
>
> _______________________________________________
> 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/20220329/0a759b30/attachment.html>


More information about the postgis-users mailing list