Hey Jeremy,

It's hard to recommend something because I don't know your fault
tolerance, but one approach could be the following (i'll use integers
for illustration purposes).

Say you have an interval from 2 to 10. You could have a list property
on this entity which samples the interval at some predefined
resolution, so your entity from 2 to 10 would have a list property of:

List<Integer> sampleProperty = 2,3,4,5,6,7,8,9,10

Then if you have another interval that you want to check for
intersection, you can run two queries (less than & greater than)
against the above list property. For example,  a new entity spanning
from 3 to 6. Checking for intersection would do following query

query.addFilter(sampleProperty, FilterOperator.GREATER_THAN, 3) and
query2.addFilter(sampleProperty, FilterOperator.LESS_THAN, 6)

Since you mentioned unbounded floating points,  you might worry about
1MB entity size with this approach. But nothing would really prevent
you using the concept of sharded counters to this problem. So you'd
have a bunch of entities with the sampler list property close to max
entity size, but referring to one object, so that your query would
match one of the shards.

Hope this helps in some way.

Cheers!

On Mar 19, 7:34 am, Tim Hoffman <[email protected]> wrote:
> Hi
>
> You might want to have a look at how geohash  
> http://en.wikipedia.org/wiki/Geohash
> does things.  I know it doesn't correspond with what you want
> but it might give you some ideas.
>
> T
>
> On Mar 19, 7:37 pm, jeremy <[email protected]> wrote:
>
>
>
> > @tristan: there's nothing difficult about individual intersection
> > tests. the issue is that i can only perform inequality operations on a
> > single property.
>
> > how do i match both the end and the beginning - is there someway to
> > encode them in the same property?
>
> > On Mar 18, 3:31 pm, Tristan <[email protected]> wrote:
>
> > > sounds like the 3D graphics guys solved this problem... if you post
> > > the solution perhaps i'll be able to suggest on how to do it in a
> > > datastore
>
> > > On Mar 18, 4:16 am, Scott Ellis <[email protected]> wrote:
>
> > > > are they dates? floating point values? values on a scale from 1 to 5? 
> > > > all of
> > > > the above?
>
> > > > On 18 March 2010 19:28, jeremy <[email protected]> wrote:
>
> > > > > i have objects which store a 'start' and 'end' position.
>
> > > > > given an arbitrary interval, i'd like to return all objects with which
> > > > > it intersects.
>
> > > > > can anyone think of an approach to modeling this on datastore?
>
> > > > > --
> > > > > You received this message because you are subscribed to the Google 
> > > > > Groups
> > > > > "Google App Engine" group.
> > > > > To post to this group, send email to 
> > > > > [email protected].
> > > > > To unsubscribe from this group, send email to
> > > > > [email protected]<google-appengine%2Bunsubscrib
> > > > >  [email protected]>
> > > > > .
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to