[prev in list] [next in list] [prev in thread] [next in thread]
List: postgis-users
Subject: Re: [postgis-users] Adaptive k-nearest neigbourh in PostGIS
From: Giuseppe Broccolo <g.broccolo.7 () gmail ! com>
Date: 2018-01-08 15:48:19
Message-ID: CAFtuf8CKUSNXKt2T_nPGu+Ec2_Nq9EvC_D4MvTq8jCSLTtdq5w () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi Vilem,
2018-01-08 16:26 GMT+01:00 Vilem Ded <Ded.V@seznam.cz>:
> Thanks,
> very nice indeed! I will definitely give that a try.
> But this is really very dependent on data distribution. My dataset is
> clustered so it will be better, but probably not good enough:/
> As I understood KNN in Postgis is implemented with priority queue?
> If so, there must be condition of type while i < k {next} , where k is our
> K in KNN. I was hoping for some way how to alter this part of code - "just"
> change those few lines..
>
Yes, kNN in PostgreSQL is based on pairing heap algorithm, that provides a
priority queue of index nodes at some point. Consider that kNN is supported
in GiST indexing more in general - i.e., it is not just a part of PostGIS.
Regards,
Giuseppe.
[Attachment #5 (text/html)]
<div dir="ltr">Hi Vilem,<br><div><div class="gmail_extra"><br><div \
class="gmail_quote">2018-01-08 16:26 GMT+01:00 Vilem Ded <span dir="ltr"><<a \
href="mailto:Ded.V@seznam.cz" \
target="_blank">Ded.V@seznam.cz</a>></span>:<br><blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Thanks, \
<br>very nice indeed! I will definitely give that a try. <br>But this is really very \
dependent on data distribution. My dataset is clustered so it will be better, but \
probably not good enough:/<br>As I understood KNN in Postgis is implemented with \
priority queue?<br>If so, there must be condition of type while i < k {next} , \
where k is our K in KNN. I was hoping for some way how to alter this part of code - \
"just" change those few \
lines..<br></div></blockquote><div><br></div><div>Yes, kNN in PostgreSQL is based on \
pairing heap algorithm, that provides a priority queue of index nodes at some point. \
Consider that kNN is supported in GiST indexing more in general - i.e., it is not \
just a part of PostGIS.</div><div><br></div><div>Regards,</div><div>Giuseppe.<br></div></div><br></div></div></div>
[Attachment #6 (text/plain)]
_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic