Hey,

:).

You can do:

        g.idx('test')[['bbox','[15.0, 16.0, 56.0, 61.0]']]

See ya,
Marko.

http://markorodriguez.com

On Aug 8, 2011, at 4:27 PM, Peter Neubauer wrote:

> Boris,
> I extended the functional tests to do what you are asking for,
> https://github.com/neo4j/neo4j-spatial/blob/master/features/start-and-stop.feature
> 
> Basically:
> 
> Create a Spatial Layer
> Add nodes
> Load the index with "provider"=>"spatial" configuration
> Query it using Cypher
> Query it using Gremlin
> Query it using the REST index interface
> 
> Thus, you can now query the (trivial) point layer index using any of
> your favorite methods. Is that helpful?
> 
> Cheers,
> 
> /peter neubauer
> 
> GTalk:      neubauer.peter
> Skype       peter.neubauer
> Phone       +46 704 106975
> LinkedIn   http://www.linkedin.com/in/neubauer
> Twitter      http://twitter.com/peterneubauer
> 
> http://www.neo4j.org               - Your high performance graph database.
> http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
> 
> 
> 
> On Mon, Aug 8, 2011 at 3:31 PM, Peter Neubauer
> <[email protected]> wrote:
>> Ahh ok.
>> In that case, I should extend the capabilities of the REST plugins and add a
>> test for it. Will see if I can get to it tonight, ok?
>> 
>> /peter
>> 
>> Sent from my phone.
>> 
>> On Aug 8, 2011 2:41 PM, "Boris Kizelshteyn" <[email protected]>
>> wrote:
>>> Can I set this in the server config? I am doing everything via rest right
>>> now, I am using the spatial plugin for doing the spatial operations.
>>> 
>>> On Mon, Aug 8, 2011 at 3:05 AM, Peter Neubauer <
>>> [email protected]> wrote:
>>> 
>>>> Boris, make sure that you have initialized the spatial index before
>>>> you access is. See
>>>> 
>>>> 
>>>> https://github.com/neo4j/neo4j-spatial/blob/master/src/test/java/org/neo4j/gis/spatial/IndexProviderTest.java#L68
>>>> for loading the index with "provider=spatial". The index is loaded
>>>> "lazy", and thus not available before explicitly loaded. I guess you
>>>> have to do it in your loading code in Java or Groovy, since you can't
>>>> provide the configuration in Gremlin or Cypher. After the first load,
>>>> the index will be saved in the database and be visible as any other
>>>> index. I haven't tried this out but it should work, as you see in the
>>>> test case.
>>>> 
>>>> Does that work?
>>>> 
>>>> Cheers,
>>>> 
>>>> /peter neubauer
>>>> 
>>>> GTalk: neubauer.peter
>>>> Skype peter.neubauer
>>>> Phone +46 704 106975
>>>> LinkedIn http://www.linkedin.com/in/neubauer
>>>> Twitter http://twitter.com/peterneubauer
>>>> 
>>>> http://www.neo4j.org - Your high performance graph database.
>>>> http://startupbootcamp.org/ - Öresund - Innovation happens HERE.
>>>> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>>>> 
>>>> 
>>>> 
>>>> On Sun, Aug 7, 2011 at 11:11 PM, Boris Kizelshteyn <[email protected]>
>>>> wrote:
>>>>> I'm doing it from the console.
>>>>> 
>>>>> On Sun, Aug 7, 2011 at 5:09 PM, Peter Neubauer
>>>>> <[email protected]> wrote:
>>>>>> 
>>>>>> What is the surrounding code before that call? You gave to at least
>>>>>> once
>>>>>> get that index as in the test via the index provider parameters before
>>>> this
>>>>>> works.
>>>>>> 
>>>>>> /peter
>>>>>> 
>>>>>> Sent from my phone.
>>>>>> 
>>>>>> On Aug 7, 2011 10:25 PM, "Boris Kizelshteyn" <[email protected]> wrote:
>>>>>>>> 
>>>>>>>> 
>>>>>>>> Hi Peter,
>>>>>>>> 
>>>>>>>> I tried this today but I can't seem to get the syntax right in the
>>>>>>>> context
>>>>>>>> of g.idx, I tried this:
>>>>>>>> 
>>>>>>>> g.idx('spatial')[["start n=(mylayer,'bbox:[myvals]') match (n) -[r]
>>>>>>>> -
>>>>>>>> (x)
>>>>>>>> return n.bbox, r~TYPE, x.layer?, x.bbox?"]]
>>>>>>>> 
>>>>>>>> But it does nothing, not even an error. So I am proly doing
>>>>>>>> something
>>>>>>>> terrible wrong? Also, I don't see the spatial index in the idx list
>>>> in
>>>>>>>> the
>>>>>>>> webpanel, I know I have one as I am able to query other spatial
>>>>>>>> info.
>>>>>>>> 
>>>>>>>> Thanks!
>>>>>>>> 
>>>>>>>> On Wed, Aug 3, 2011 at 12:48 PM, Peter Neubauer <
>>>>>>>> [email protected]> wrote:
>>>>>>>> 
>>>>>>>>> Boris,
>>>>>>>>> I was thinking of adding a test with Gremlin onto
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>> 
>>>> https://github.com/neo4j/neo4j-spatial/blob/master/src/test/java/org/neo4j/gis/spatial/IndexProviderTest.java#L90
>>>>>>>>> ,
>>>>>>>>> but basically, since recently a trivial point layer is exposed as
>>>>>>>>> an
>>>>>>>>> IndexProvider, enabling Neo4j, Cypher and Gremlin to treat this as
>>>>>>>>> a
>>>>>>>>> normal index. I have not tested it, but I suspect it works. Give
>>>>>>>>> it
>>>> a
>>>>>>>>> try and report back!
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> Cheers,
>>>>>>>>> 
>>>>>>>>> /peter neubauer
>>>>>>>>> 
>>>>>>>>> GTalk: neubauer.peter
>>>>>>>>> Skype peter.neubauer
>>>>>>>>> Phone +46 704 106975
>>>>>>>>> LinkedIn http://www.linkedin.com/in/neubauer
>>>>>>>>> Twitter http://twitter.com/peterneubauer
>>>>>>>>> 
>>>>>>>>> http://www.neo4j.org - Your high performance graph
>>>>>>>>> database.
>>>>>>>>> http://startupbootcamp.org/ - Öresund - Innovation happens HERE.
>>>>>>>>> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing
>>>>>>>>> party.
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> On Wed, Aug 3, 2011 at 9:36 AM, Boris Kizelshteyn
>>>>>>>>> <[email protected]
>>>>> 
>>>>>>>>> wrote:
>>>>>>>>>> how would you do a basic find point in layer type query?
>>>>>>>>>> 
>>>>>>>>>> Thanks!
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Neo4j mailing list
>>>>>>>>>> [email protected]
>>>>>>>>>> https://lists.neo4j.org/mailman/listinfo/user
>>>>>>>>>> 
>>>>>>>>> _______________________________________________
>>>>>>>>> Neo4j mailing list
>>>>>>>>> [email protected]
>>>>>>>>> https://lists.neo4j.org/mailman/listinfo/user
>>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>> 
>> 
> _______________________________________________
> Neo4j mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user

_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to