Opened 8 years ago

Closed 17 months ago

#1847 closed enhancement (fixed)

spgist 2d and 3d bindings for geometry

Reported by: robe Owned by: robe
Priority: high Milestone: PostGIS 2.5.0
Component: postgis Version: master
Keywords: Cc:

Description

Before I forget -- didn't see it on the list, and Paul you said you have it planned for 2.1.

spgist is a new gist type supported in 9.2. We will start with just 2d support for 2.1 and perhaps later nd.

Creating an spgist index would look like:

CREATE INDEX idx_edges_geom_spgist ON edges USING spgist (geom);

Details on spgist: http://www.pgcon.org/2011/schedule/events/309.en.html

Attachments (1)

0002-spgist-polygon-8.patch (25.6 KB) - added by komzpa 2 years ago.

Download all attachments as: .zip

Change History (26)

comment:1 Changed 8 years ago by robe

Version: 2.0.xtrunk

comment:2 Changed 7 years ago by pramsey

Milestone: PostGIS 2.1.0PostGIS Future

comment:3 Changed 6 years ago by robe

Milestone: PostGIS FuturePostGIS 2.2.0
Owner: changed from pramsey to strk

Looks like Mohit will be working on this as part of GSoc and strk will be mentoring? or did I misunderstand?

https://www.google-melange.com/gsoc/project/details/google/gsoc2014/mohitkharb/5665319561461760

Excerpt from google summer of code

 The idea is to design and implement hierarchical clustering to the point data in Postgres database and integrate it in CartoDB such that beyond a lower zoom level the spatially nearer points merge into one another to form a single point. The leaf nodes will contain the original point data and the intermediate nodes will have the count of leaf nodes below that level. It will implement SP-GiST indexing on the underlying postGIS database. 

comment:5 Changed 6 years ago by strk

You are not mistaken. I asked Mohit to report to postgis-devel (in addition to cartodb forum)

comment:6 Changed 6 years ago by strk

Status: newassigned

comment:8 Changed 5 years ago by mohitkharb

Hi all, The first commit is at https://github.com/mohitkharb/postgis/commit/d0d87512 https://github.com/mohitkharb/postgis/commit/d0d87512.patch The code would be cleaned by tomorrow and I will update another patch.

comment:9 Changed 5 years ago by robe

Owner: changed from strk to pramsey
Status: assignednew

pramsey has a work in progress works against patched 9.5

Here’s the postgresql branch

https://github.com/pramsey/postgres/tree/spgistcompress

Here’s the postgis branch (you have to manually load the gserialized_spgist_2d.sql file to get the bindings)

More details here: http://lists.osgeo.org/pipermail/postgis-devel/2014-December/024651.html

https://github.com/pramsey/postgis/tree/spgist-kdtree

comment:10 Changed 5 years ago by robe

Paul,

Sadly you may need to let this one go triage since I still feel it ain't going to make the 9.5 cut.

comment:11 Changed 5 years ago by pramsey

Milestone: PostGIS 2.2.0PostGIS Future

Moving it to future; without compress in spgist it's not happening.

comment:12 Changed 2 years ago by robe

Milestone: PostGIS FuturePostGIS Fund Me

Milestone renamed

comment:13 Changed 2 years ago by komzpa

There is SP-GiST compress patch on commitfest: https://commitfest.postgresql.org/15/1298/

Let's review it and try to comment, so we get the chance for SP-GiST in PostGIS?

comment:14 Changed 2 years ago by robe

Milestone: PostGIS Fund MePostGIS 2.5.0

shooting for PostGIS 2.5

comment:15 Changed 2 years ago by komzpa

comment:16 Changed 2 years ago by pramsey

OK, so an implementation of kd-tree that only accepts points is easy enough. Is there another patchset that provides an example of the 4-d approach for boxes that was mentioned in the -hackers email chain?

Changed 2 years ago by komzpa

Attachment: 0002-spgist-polygon-8.patch added

comment:17 Changed 2 years ago by komzpa

@pramsey: look at the attached patch I took from the thread.

comment:19 Changed 18 months ago by robe

Owner: changed from pramsey to robe

comment:20 Changed 18 months ago by robe

I'm guessing pull requests

https://github.com/postgis/postgis/pull/258

and

https://github.com/postgis/postgis/pull/251

fall into this bucket though maybe (251 spgist for box3d) should have a separate ticket

comment:21 Changed 18 months ago by robe

Summary: spgist 2d bindings for geometryspgist 2d and 3d bindings for geometry

comment:22 Changed 18 months ago by robe

In 16626:

spgist 2d and 3d support for PG 11+
references #1847
Credits: Arthur Lesuisse, Esteban Zimanyi from Université Libre de Bruxelles (ULB) and Darafei Praliaskouski
also added logic to exclude PG < 11 from including this functionality
Closes https://github.com/postgis/postgis/pull/258

comment:23 Changed 18 months ago by robe

This still needs documentation.

comment:24 Changed 17 months ago by komzpa

In 16641:

SP-GiST implementation polishing

Added copyrights to headers, moved BOX3D function declarations from SP-GiST to box3d headers to suppress warnings.

References #1847
Closes https://github.com/postgis/postgis/pull/269

comment:25 Changed 17 months ago by komzpa

Resolution: fixed
Status: newclosed

In 16642:

SP-GiST documentation.

Patch provided by Esteban Zimanyi.

Closes #1847

Note: See TracTickets for help on using tickets.