<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Minor update. I've rewritten the list of polygons to a proper SQL statement and seeing it all in one layer now starts to make at least some sense to me.</div>

<div>I will see if i can add some lines to have the KD-tree look. Still, would be nice to know, what to do with the leaf_values.</div>

<div> </div>

<div> 
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Dienstag, 05. März 2019 um 22:21 Uhr<br/>
<b>Von:</b> "Felix Kunde" <felix-kunde@gmx.de><br/>
<b>An:</b> postgis-users@lists.osgeo.org<br/>
<b>Betreff:</b> [postgis-users] Visualize sp-GiST index structure</div>

<div name="quoted-content">Hi there,<br/>
 <br/>
I'm trying to use Gevel to print the structure of my sp-GiST indexes. For GiST, it works fine as descibed here: <a href="https://gist.github.com/Komzpa/f9e1c241d1d2a27cf5a4f985f646f8a6" target="_blank">https://gist.github.com/Komzpa/f9e1c241d1d2a27cf5a4f985f646f8a6</a><br/>
But for spgist_print I'm getting error with the leaf_values.<br/>
 <br/>
SELECT <br/>
  ST_SetSRID(replace(prefix::text, '2DF', '')::box2d::geometry, 4326) as geom,<br/>
  tid, allthesame, node_n, level, tid_pointer, node_label, leaf_value<br/>
FROM<br/>
 spgist_print('pts16_spgist') as t<br/>
        (<br/>
            tid tid,<br/>
            allthesame bool,<br/>
            node_n int, <br/>
            level int, <br/>
            tid_pointer tid, <br/>
            prefix box2df, <br/>
            node_label int,<br/>
            leaf_value geometry<br/>
        );<br/>
 <br/>
ERROR: Unknown geometry type: 1128379426 - Invalid type<br/>
<br/>
As long as I only select levels where leaf_value is null it works.<br/>
Was hoping I could get an unterstanding how the index is structured by looking only at the prefix boxes, but they are so small an only lie in the center of my dataset. I've attached a file, where I have copied the prefixes of the first three levels. At level 4, I'm getting errors.<br/>
<br/>
Has anybody already tried this before?<br/>
<br/>
Cheers,<br/>
Felix_______________________________________________<br/>
postgis-users mailing list<br/>
postgis-users@lists.osgeo.org<br/>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></div>
</div>
</div></div></body></html>