<div dir="ltr">Hi Frederick,<br><div><div class="gmail_extra"><br><div class="gmail_quote">2018-03-01 14:30 GMT+01:00 Frederick Powers <span dir="ltr"><<a href="mailto:orangehandle@gmail.com" target="_blank">orangehandle@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Greetings,<br><br></div>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?<br><br></div>Any help on an explanation of this would be appreciated, thank you.<span class="HOEnZb"><font color="#888888"><br></font></span></div></div></blockquote><div><br></div><div>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. <br></div><div>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.<br><br></div><div>This is just a fast resume. Hope it can help.<br><br></div><div>Giuseppe.<br></div></div></div></div></div>