Opened 12 years ago

Closed 6 years 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 6 years ago.

Download all attachments as: .zip

Change History (26)

comment:1 by robe, 12 years ago

Version: 2.0.xtrunk

comment:2 by pramsey, 11 years ago

Milestone: PostGIS 2.1.0PostGIS Future

comment:3 by robe, 10 years ago

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 by strk, 10 years ago

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

comment:6 by strk, 10 years ago

Status: newassigned

comment:8 by mohitkharb, 10 years ago

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 by robe, 9 years ago

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 by robe, 9 years ago

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 by pramsey, 9 years ago

Milestone: PostGIS 2.2.0PostGIS Future

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

comment:12 by robe, 7 years ago

Milestone: PostGIS FuturePostGIS Fund Me

Milestone renamed

comment:13 by komzpa, 7 years ago

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 by robe, 7 years ago

Milestone: PostGIS Fund MePostGIS 2.5.0

shooting for PostGIS 2.5

comment:16 by pramsey, 6 years ago

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?

by komzpa, 6 years ago

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

comment:17 by komzpa, 6 years ago

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

comment:19 by robe, 6 years ago

Owner: changed from pramsey to robe

comment:20 by robe, 6 years ago

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 by robe, 6 years ago

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

comment:22 by robe, 6 years ago

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 by robe, 6 years ago

This still needs documentation.

comment:24 by komzpa, 6 years ago

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 by komzpa, 6 years ago

Resolution: fixed
Status: newclosed

In 16642:

SP-GiST documentation.

Patch provided by Esteban Zimanyi.

Closes #1847

Note: See TracTickets for help on using tickets.