Re: Special query type for Spatial DB
Date: Tue, 27 Jan 2004 12:20:52 -0800
Message-ID: <4TzRb.20$9F.242_at_news.oracle.com>
"Arthur Yeo" <ayeo_at_acm.org> wrote in message
news:a79bf3a3.0401271032.4601af2f_at_posting.google.com...
> "Mikito Harakiri" <mikharakiri_at_iahu.com> wrote in message
news:<BXUNb.8$KI3.136_at_news.oracle.com>...
> > Your question has many interpretation. What is the universe of
discourse? Is
> > it a metric space, or graph? How do you define "closeness" metric for a
set
> > of points? Do you want the exact answer, or approximate one?
>
> It can be metric-space (with some additional work added to support
> it).
> Closeness = shortest distance
> i.e. For every point in a given neighborhood of points, its distance
> to every other point is the shortest.
Do you mean minimal diameter of the cluster A?
diam(A) = max(||x-y||), for any x and y from A
Note that
sqrt(sum(||x-y||^2)), for any x and y from A
is a natural clustering factor metrics as well.
> Approximate is fine.
Given that we routinely operate floating point numbers, how can it be
otherwise:-)
> > Assuming that you can get away with approximate answer, could I suggest
Suppose you know the minimal diameter of 5 point set that includes a given
point from your set:
relation densityMap5 (
Then, your query might look like this:
select * from densityMap5, fireStations
> > density map? Density is a function that associates a number with every
point
> > in your metric space, or graph. Density map is an incremental evaluation
> > structure on your universe of discourse. Every time you modify your
> > universe -- add a pulsar point into 3D space, or add a fire station node
> > into network of existing firestation -- you have to update your density
map.
> > Quering density map is easy: just fimd me the maximum.
>
> Density map sounds very interesting.
> However, I see a problem in adding more to the WHERE-clause if my
> query is slightly modified so that it becomes:
> Find me 5 fire-stations in California that are closest to each other
> and everyone of them must have, at least, 2 free fire-engines.
>
> Is there an easy way to augment a density-map with other properties,
> like the free fire-engines example so that it can support more complex
> queries?
x location, -- fire station's location
diameter real -- diameter of 5 point set cluster that includes x
)
where distance(fireStations.x, densityMap5.x) < densityMap5.diameter
order by densityMap.diameter
