[postgis-devel] [cartodb] Re: GSOC weekly report 2 : Spatial clustering in PostGIS and CartoDB
Sandro Santilli
strk at keybit.net
Tue Jun 10 02:26:52 PDT 2014
On Sat, Jun 07, 2014 at 07:55:16AM +0530, mohit kumar wrote:
> Thanks Oleg for the help.
> I am looking at the examples of the spgist opclasses, and would get back to
> you in case of any doubt.
> My idea for clustering was to index point data using quad trees and display
> a single point in place of cluster of spatially close points.
Associated with the single point you'll want a count of underlying points
and the shape of the reference partition (a rectangle?).
> The zoom level will decide the spatially close points that can be
> represented as a single point. This zoom level would be given by the
> map(user). If this value is integrated in indexing, the nodes having the
> zoom value lower than the asked value would be send by the dB to the map.
The zoom level would be the depth level in the space partitioned tree.
The tree will need to be a quadtree and take the maximum extent (and I
guess the max depth?) as a parameter.
> The purpose of keeping the child nodes was to show the number of points in
> the cluster represented by the single point. This point will be that node
> whose zoom value equaling the zoom value of the map.
> I know this will make index creation very slow, but once done, the point
> display in the map might become a lot cleaner.
We're after speed here. Cleanness we already have, just slow to compute
as it takes a full table scan :) The idea is querying the index to have
the clustering information in a quicker way.
--strk;
> This was what I thought on implementation of the work.
> Your feedback and suggestions are much needed.
>
> Regards,
> Mohit
> On Jun 6, 2014 4:45 PM, "Oleg Bartunov" <obartunov at gmail.com> wrote:
>
> > Mohit,
> >
> > could you explain us what do you want from us :)
> > Basically, you need to create new type (if needed) and write opclass for
> > spgist. There are several questions:
> >
> > 1. Where do you get zoom level ?
> > 2. Are you sure you want to keep number of child nodes ? It's too slow for
> > index creation.
> >
> > you may look examples of spgist opclasses
> > src/backend/access/spgist
> >
> > Oleg
> > On Jun 5, 2014 12:50 PM, "mohit kumar" <mohitkharb at gmail.com> wrote:
> >
> >> Thanks Strk for the help.
> >> I have now moved to postgresSQL implementation of the sp-gist indexing
> >> and am working on it.
> >>
> >> Hi Teodor,Oleg, actually along with the sp-gist index in PostGIS
> >> Geometry (point data) I wanted to store the zoom levels and number of child
> >> nodes along the indexes for a better indexing at a given zoom level.
> >>
> >> Regards,
> >> Mohit
> >>
> >>
> >> On Wed, Jun 4, 2014 at 3:00 PM, Sandro Santilli <strk at keybit.net> wrote:
> >>
> >>> [moved exclusively to postgis-devel]
> >>>
> >>> On Wed, Jun 04, 2014 at 12:29:56AM +0530, mohit kumar wrote:
> >>> > On Tue, Jun 3, 2014 at 5:20 PM, Sandro Santilli <strk at cartodb.com>
> >>> wrote:
> >>>
> >>> > > What's in that package that isn't already in the PostgreSQL
> >>> > > SP-GiST index ?
> >>> > > http://www.postgresql.org/docs/9.2/static/spgist.html
> >>> > >
> >>> > > I mean, don't you only need to implement the PostGIS connector ?
> >>> >
> >>> > I wanted to modify the code for sp-gist to inculcate another integer
> >>> field
> >>> > for various levels of clustering, so worked on the source code by
> >>> purdue
> >>> > research group.
> >>>
> >>> The best would be to contribute a patch back to PostgreSQL to make the
> >>> existing sp-gist code capable of doing what you need, if it isn't
> >>> already.
> >>>
> >>> I've added Teodor and Oleg (authors of the PostgreSQL implmentation) in
> >>> Cc,
> >>> could you describe what your additional integer is meant to provide ?
> >>>
> >>> Teodor, Oleg, the context here is adding sp-gist support to PostGIS
> >>> Geometry
> >>> and using those indices to quickly compute population in a quadtree tile.
> >>>
> >>> REF:
> >>>
> >>> http://www.google-melange.com/gsoc/proposal/public/google/gsoc2014/mohitkharb/5698390809640960
> >>>
> >>> --strk;
> >>>
> >>> () ASCII ribbon campaign -- Keep it simple !
> >>> /\ http://strk.keybit.net/rants/ascii_mails.txt
> >>>
> >>
> >>
> >>
> >> --
> >> Mohit Kumar
> >> +91-970-3840-175
> >> Lab For Spatial Informatics
> >> International Institute of Information Technology
> >> Hyderabad, India
> >>
> >
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
--
() ASCII ribbon campaign -- Keep it simple !
/\ http://strk.keybit.net/rants/ascii_mails.txt
More information about the postgis-devel
mailing list