Re: [postgis-users] Query with LIMIT but as random result set?

From: Stefan Keller <sfkeller(at)gmail(dot)com>
To: Kevin Grittner <kgrittn(at)mail(dot)com>
Cc: PostGIS Users Discussion <postgis-users(at)lists(dot)osgeo(dot)org>, pgsql-general List <pgsql-general(at)postgresql(dot)org>
Subject: Re: [postgis-users] Query with LIMIT but as random result set?
Date: 2013-01-10 22:36:38
Message-ID: CAFcOn29kUGYvDo3HoTs1YcJj_WugPXpccHG+pf+WLHiopU95PQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Kevin

No; I'm thinking about some query (or function) that selects random
points (POIs) with certain characteristics like decreasing density. I
didn't find much theory about how to *create* such random points.

There seems to be more literature and implementation about measuring
geographic distribution (like in ArcGIS http://bit.ly/13lTFj9 ).

Under "radial distribution function" I understand a function which
describes how density varies depending on the distance from a
reference point (= the user).

Yours, Stefan

2013/1/10 Kevin Grittner <kgrittn(at)mail(dot)com>:
> Stefan Keller wrote:
>
>> "... ORDER BY random() LIMIT 10;" works ok.
>>
>> But with the following option it gets more tricky assume:
>>> And as an option the (limited) resultset should be spatially
>>> distributed (not clustered).
>>
>> I'm thinking about some radial spatial distribution function.
>
> So, you explicitly *don't* want a random selection? By "spatially
> distributed" you mean that if you have already chosen one
> particular location, other locations which are close to it should
> be less probable (or impossible) to include in the limited result
> set? How would you define the desired result? The one with the
> highest best solution to the "traveling salesman" problem?
>
> -Kevin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message xunuogui 2013-01-11 04:28:38 What can we do to create windows 7 boot disk
Previous Message wschwurack 2013-01-10 21:33:11 Re: Error: absolute path not allowed