Visualize PostGIS index using Gevel in Postgres 9.6:
git clone git://sigaev.ru/gevel
cd gevel
git checkout bd8b8b031a8049a6e7c18c00946bfbd99d75d27f
USE_PGXS=1 make
sudo USE_PGXS=1 make install
psql -f /usr/share/postgresql/9.6/contrib/gevel.sql
psql
drop table if exists idx_vis;
create table idx_vis as (select level, replace(a::text, '2DF', '')::box2d::geometry as geom from gist_print('idx') as t(level int, valid bool, a box2df));
Hey there, I used this to visualize my GiST-Index. Pretty nice. Wanted to do the same for the sp-Gist index. For the
prefix
it also returnsbox2df
, but the Polygons appear in the center of my test area and are very small. Theleaf_value
returnsgeometry
but looks empty.I'm having the feeling that the result of
spgist_print
can not really be used for displaying it on a map. Tried reading into the source file but I do not understand the decomposition into higher dimensions.