[Tile-serving] [openstreetmap/osm2pgsql] Use SP-GiST indexes when available (#1357)

mboeringa notifications at github.com
Sun Dec 6 11:53:03 UTC 2020


> We don't cluster on the geometry indexes, and in fact doing so would make the table ordering worse.

I can see how clustering based on the spatial index would not be as good as the Hilbert curve's results as created by an 'ORDER BY way' clause, but it does seem to result in at least significantly more spatially coherent data. The first image below is a fetch of the first 5000 records as shown in DBeaver, and as returned from a much larger Germany dataset with OpenStreetMap's main road classes, and clearly shows signs of severe spatial fragmentation after the particular processing done on the dataset. The second image shows a similar 5000 record fetch of the same dataset after spatial defragmentation using CLUSTER with the spatial index as input.

**Before clustering:**
![afbeelding](https://user-images.githubusercontent.com/7635726/101279183-c7c8b480-37c0-11eb-9173-680912b84a97.png)

**After clustering:**
![afbeelding](https://user-images.githubusercontent.com/7635726/101279246-3efe4880-37c1-11eb-958b-1dcb4051960b.png)


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/1357#issuecomment-739491959
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20201206/49da2abb/attachment.htm>


More information about the Tile-serving mailing list