[postgis-users] Bounding Box of Spatial Index for Points
Giuseppe Broccolo
g.broccolo.7 at gmail.com
Thu Mar 1 07:34:40 PST 2018
Hi Frederick,
2018-03-01 14:30 GMT+01:00 Frederick Powers <orangehandle at gmail.com>:
> Greetings,
>
> How is the bounding box determined when creating a spatial index for point
> geometries? It's my understanding that creating a spatial index utilizes
> bounding boxes, which makes sense to me for lines and polygons, but I had a
> hard time finding information on how that works for points. Do points get
> bounding boxes as part of their spatial index, or are they handled some
> other way?
>
> Any help on an explanation of this would be appreciated, thank you.
>
PostGIS supports two indexing algorithms included in the PostgreSQL core:
GiST and BRIN. The first one implements an RTree structure, while the
second divides the indexed dataset into the so called "ranges", i.e. the
bounds within the geometries are included specifying the desired
granularity. BRINs have generally lower performance than GiST indexes, but
are more manageable in terms of size and time needed to be created and are
fully usable with (really) large datasets like LiDAR surveys.
Both algorithms are based on bounding boxes: indexed objects are stored in
the index considering their bounding boxes, that coincide with the same
point in case of point datasets. BRIN support just inclusion and
overlapping operators, that work considering just the bounding boxes. GiST
support the distance operator in addition, and was using just bounding
boxes up to PostgreSQL 9.5, then distances could be properly computed
taking into account the details of the indexed geometries.
This is just a fast resume. Hope it can help.
Giuseppe.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20180301/465978bc/attachment.html>
More information about the postgis-users
mailing list