[postgis-devel] KNN and Semantics

Paragon Corporation lr at pcorp.us
Mon Sep 26 13:19:33 PDT 2011


> So, here's the deal, the KNN search works exclusively against 
> the index. So, it only has boxes available to make decisions 
> (not entirely true, it actually has the full geometry of the 
> query key, but not of the index keys). That means it can 
> return an exact answer for point-on-point queries, but for 
> everything else it'll be a box approximation. So the n-nearest-boxes.
> 
> There are lots of ways to attack the problem... we can do 
> pure nearest-boxes. We could also convert all the boxes to 
> points, and do nearest-centroids. This might be easiest to 
> explain, potentially. The trouble is, we're going to be 
> returning an approximation for everything except points, so 
> the question is (in my mind) which approximation is easiest 
> to visualize and work with?
> 

Not sure I understand your question Paul?   I don't see how nearest
centroids helps much when you are talking 
about largish polygons.  I was thinking this would just make the ST_Expand
like stuff faster? Oh perhaps I misunderstood that.

Thanks,
Regina






More information about the postgis-devel mailing list