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

Shaozhong SHI shishaozhong at gmail.com
Mon Mar 28 02:42:04 PDT 2022


Hi, Lars,

Would the following alternative work?

In PostGIS, one can group by geometry.  Based on this information, can grid
be generated?  so that grid with 0 features can be skipped.

Regards,

David

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

> >From: postgis-users <postgis-users-bounces at lists.osgeo.org> on behalf of
> Shaozhong SHI <shishaozhong at gmail.com>Sent: Monday, March 28, 2022 10:25
> AMTo: 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
> >
> >Hi, Lars,
> >
> >No explanation on content-balanced_grid can be found.  What is it based
> on?  What does content mean in this context?  Why do so?
> >
> Hi
>
> There is some info in the readme file
> https://github.com/larsop/content_balanced_grid#readme and here I also
> refer to
> " For a exaample of usage look at page 18-23 at
> http://www.slideshare.net/laopsahl/foss4-g-topologyjuly162015
>
> "
>
> The idea very simple the higher density of polygons/features in a area the
> smaller will the grid cells be. When running it you have parameter for how
> many feature that should be max in each grid cell. Content is
> polygons/features.
>
> The code is also quite simple and the main function is here
> https://github.com/larsop/content_balanced_grid/blob/master/func_grid/functions_def_02_content_based_balanced_grid.sql
> .
>
> The code in github is used quite often in NIBIO, but this code not like
> Postgis code that works in almost any case. NIBIO is basically developing
> code to solve problems we have and when does are solved we start to solve
> other problems, but we put the code out in case other may need it and make
> easy for other to help use to fix errors.
>
> 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/20220328/02974287/attachment.html>


More information about the postgis-users mailing list