[postgis-users] optimum no of slices in pgis_fn_nn() ?

Paragon Corporation lr at pcorp.us
Tue Mar 17 06:01:41 PDT 2009

Hi Smith,

I presume you are talking about this


As far as optimal slices go, it depends how your data is sparsed out.
Unfortunately it's a bit of trial and error that I hadn't fleshed out and
benchmarked enough to see.

So lets say you set your max distance to 10000 meters, you want most of your
results to hit the first span out and subsequent span outs are to catch
outliers.  So if max distance is 10000 and you think 70% would be within
10000/10 (1000, then you would use 10 for slices).  But then if your data is
very sparse out you want your max distance to be much bigger and slices to
be greater.

There is one bug that I was meaning to fix in this, which I guess I should
now since people are using this. It deals with largish objects that don't
fit a span box and I also need to revise to use the new naming conventions
since it was a while ago I wrote this.

Anyrate as Mark mentioned, if you give a specific example, maybe I could be
a bit more useful in my answer.


-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Mark
Sent: Tuesday, March 17, 2009 6:09 AM
To: autisi at yahoo.com; PostGIS Users Discussion
Subject: Re: [postgis-users] optimum no of slices in pgis_fn_nn() ?

Smith Roman wrote:

> Hi Everyone,
> What is the optimum no to use in the function pgis_fn_nn() ? An example on
how this function is used in practice will be appreciated.
> Thanks,
> Smith

Hi Smith,

I think you'll have to help us a bit. I can't see any function called
pgis_fn_nn() in either 1.3 or trunk.



Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
t: +44 870 608 0063
postgis-users mailing list
postgis-users at postgis.refractions.net

More information about the postgis-users mailing list