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

Mike Taves mwtoews at gmail.com
Sun Mar 27 13:31:40 PDT 2022


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/

then you can use ST_Intersection to "cut" the geometries out of each
box. The examples in ST_SquareGrid demonstrate this.


More information about the postgis-users mailing list