[postgis-devel] Re: geometry stats

strk strk at keybit.net
Wed Feb 25 04:10:39 PST 2004


I've added some comments in the code to explain the problem of estimating
the histogram. I've also proposed a solution, which has been implemented.

Briefly: the sum of cell values would be ok if either the search box
or the table features overlap only a single histogram cell, but when
having a bigger search_box AND average feature we need to take into
account the fact that we are counting every single feature overlap
more then once, thus we need to divide the estimated value by a factor.

I experimented using the minimun number of histogram cells occupied
between average feature and search box. 

Comments ?

--strk;

PS: I've also fixed a bug in the histogram creation process
PPS: I'm having problems with memory allocation, inclusion
     or exclusion of elog()s makes a segfault appera/disappear :!



More information about the postgis-devel mailing list