Re: [Neo4j] Searching for ways in imported OSM data

2011-01-18 Thread Craig Taverner
Hi Peter,

The OSMGeometryEncoder does expose some utilities for exploring the OSM
graph without knowing much about the graph. You need to know a few things,
like the geometry node passed to the index is not the way node or any of the
point nodes. So you need OSMGeometryEncoder.getOSMNodeFromGeometryNode(Node)
to get the actual way node from the geometry node in the index. Then from
the way node you can use OSMGeometryEncoder.getPointNodesFromWayNode(Node)
to get the underlying OSM point nodes in an iterator.

We could refine this to make it cleaner. But I have been working on the Ruby
API to OSM, which provides a kind-of OSM domain model with Way and Node
classes for exploring the OSM model, and I hope to drive changes in the
underlying Java API through that.

Bryce, take a look at the following wiki page for setting up uDig for Neo4j
Spatial: http://wiki.neo4j.org/content/Neo4j_Spatial_in_uDig

Regards, Craig

On Wed, Jan 19, 2011 at 7:17 AM, Peter Neubauer <
peter.neuba...@neotechnology.com> wrote:

> Just out of curiosity -
>
> if I find an OSM geometry (say, a way) from e.g. a
> SpatialDatabaseRecord, is there any easy way to get to its underlying
> OSM points, e.g. via an iterator? The Encoder/Decoder could probably
> do that job and return this without the client needing to know details
> about the graph layout, right?
>
> 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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>
>
>
> On Wed, Jan 19, 2011 at 1:45 AM, Craig Taverner  wrote:
> > Hi Bryce,
> >
> > While I had this on my mind, I decided to look into the code and I went
> > ahead developed the first approach. So now we index osm nodes in the
> r-tree
> > also (in addition to ways). By default, only nodes that have tags are
> added
> > to the index, because these are seen as 'points of interest', while all
> > other nodes are assumed to only be interesting as part of a way. However,
> I
> > added a new method to the OSMImporter that allows you to turn on indexing
> of
> > all nodes, regardless of whether they are points of interest or not.
> >
> > Just replace the old call to
> osmImporter.importFile(batchInserter,filePath)
> > with instead osmImporter.importFile(batchInserter,filePath,true). The
> last
> > parameter turns on indexing of all nodes. I've attached an image from the
> > AWE product (based on uDig) that shows a large number of dynamic layers
> > exported from the OSM model of Malmö, and you can see all nodes are
> visible.
> > This is the output from the TestDynamicLayers unit test, run with the
> > boolean set to true.
> >
> > If you are curious, the Neo Technology office is actually included in
> this
> > image :-)
> >
> > I have just pushed the code to github, so you need to get the latest from
> > there.
> >
> > Regards, Craig
> >
> > On Tue, Jan 18, 2011 at 9:27 PM, Craig Taverner 
> wrote:
> >
> >> Hi Bryce,
> >>
> >> Currently the OSM model in Neo4j Spatial only indexes the ways, which
> means
> >> that when you do spatial searches on the layers, you are always talking
> >> about the  ways. Whether this suites you or not depends on your specific
> use
> >> case. You could search for the closest ways, and the use the
> >> SpatialTopologyUtils to snap to the point node on the way that is
> closest to
> >> your point of interest, which may give you the result you want.
> >>
> >> If you are specifically interested in only searching on nodes, not ways,
> >> then there are two options, both requiring some refactoring of the OSM
> model
> >> (ie. you need to make changes to Neo4j Spatial).
> >>
> >>- In the OSMImporter code, simply add all nodes as Point geometries
> to
> >>the index. This is simple to code and will get what you want, but
> might not
> >>lead to the most efficient index, since both the ways and the nodes
> they are
> >>composed of get indexed in the same index.
> >>- Enhance the OSM model to support multiple indexes, for nodes, ways
> >>and relationships. This requires much more code, but opens the
> possibility
> >>to enhance the performance by allowing the index to be optimized for
> the
> >>geometries and densities seen in the dataset.
> >>
> >> The reasons we have not done this yet are:
> >>
> >>- Existing use cases have not required it (but we are reaching cases
> >>that do now)
> >>- It is not clear yet which of the above options is the best overall
> >>(one index or several). Originally I believed in the multiple-index
> >>approach, mostly because points can be indexed with very different
> indexes
> >>than geometries (eg. we can even place lucene behind the point index,
> which
> >>we

Re: [Neo4j] Unfinished transaction - cannot open db

2011-01-18 Thread Mattias Persson
I got your files and when using those to replay the recovery scenario
you're having trouble with everything works fine with Neo4j 1.2
version. Another thing could be a classpath problem, how does your
classpath look? Mine contains these libs (I opened the database with
the neo4j-shell command from the downloaded tar ball):

  geronimo-jta_1.1_spec-1.1.1.jar
  neo4j-examples-1.2.jar
  neo4j-graph-algo-0.7-1.2.jar
  neo4j-ha-0.5-1.2.jar
  neo4j-index-1.2-1.2.jar
  neo4j-kernel-1.2-1.2.jar
  neo4j-lucene-index-0.2-1.2.jar
  neo4j-management-1.2-1.2.jar
  neo4j-online-backup-0.7-1.2.jar
  neo4j-remote-graphdb-0.8-1.2.jar
  neo4j-shell-1.2-1.2.jar
  neo4j-udc-0.1-1.2-neo4j.jar
  netty-3.2.1.Final.jar
  org.apache.servicemix.bundles.jline-0.9.94_1.jar
  org.apache.servicemix.bundles.lucene-3.0.1_2.jar
  protobuf-java-2.3.0.jar

Is your database big, or could you send the entire database
(network/*) contents as well?

2011/1/18 Andreas Bauer :
> Hi,
>
> now I tried to use neoclipse(svn check out) with the new libs, but this 
> doesn't work... Do I have to wait for a new release or what do I have to do 
> in order to use the new libs?
>
> Thanks,
>
> Andi
>
>
>
> Am 18.01.2011 um 20:04 schrieb Andreas Bauer :
>
>> Hi,
>>
>> I can send you the data. "Network" is just the name of the database. I made 
>> a mistake, the exception occurs here:
>>
>> GraphDatabaseService neo4j = new EmbeddedGraphDatabase( "network");
>>
>> So my database is called network and after recovering the message I posted 
>> last time occurs.
>>
>> Cheers,
>>
>> Andi
>>
>>
>> Am 18.01.2011 um 10:01 schrieb Mattias Persson:
>>
>>> This look very odd. The file "network" is not something that Neo4j
>>> uses. What type of file system are you running this on? Also, would it
>>> be possible for you to send some of the files to me offlist (all files
>>> _not_ starting with "neostore" would maybe suffice).
>>>
>>> Best,
>>> Mattias
>>>
>>> 2011/1/18 Andreas Bauer :
 Hi,

 I tried to clean up my database with the new version. Seems to work. But 
 when cleanup is done and my program wants to start the database I get

 Caused by: org.neo4j.graphdb.TransactionFailureException: Unable to start 
 TM
       at 
 org.neo4j.kernel.impl.transaction.TxManager.init(TxManager.java:192)
       at org.neo4j.kernel.impl.transaction.TxModule.start(TxModule.java:97)
       at org.neo4j.kernel.GraphDbInstance.start(GraphDbInstance.java:157)
       at 
 org.neo4j.kernel.EmbeddedGraphDbImpl.(EmbeddedGraphDbImpl.java:168)
       at 
 org.neo4j.kernel.EmbeddedGraphDatabase.(EmbeddedGraphDatabase.java:81)
       at 
 org.neo4j.kernel.EmbeddedGraphDatabase.(EmbeddedGraphDatabase.java:65)
       at 
 nu.buki.data.neo4j.SocialNetworkService.(SocialNetworkService.java:38)
 Caused by: java.io.FileNotFoundException: network (No such file or 
 directory)
       at java.io.RandomAccessFile.open(Native Method)
       at java.io.RandomAccessFile.(RandomAccessFile.java:212)
       at java.io.RandomAccessFile.(RandomAccessFile.java:98)
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Searching for ways in imported OSM data

2011-01-18 Thread Peter Neubauer
Just out of curiosity -

if I find an OSM geometry (say, a way) from e.g. a
SpatialDatabaseRecord, is there any easy way to get to its underlying
OSM points, e.g. via an iterator? The Encoder/Decoder could probably
do that job and return this without the client needing to know details
about the graph layout, right?

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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Wed, Jan 19, 2011 at 1:45 AM, Craig Taverner  wrote:
> Hi Bryce,
>
> While I had this on my mind, I decided to look into the code and I went
> ahead developed the first approach. So now we index osm nodes in the r-tree
> also (in addition to ways). By default, only nodes that have tags are added
> to the index, because these are seen as 'points of interest', while all
> other nodes are assumed to only be interesting as part of a way. However, I
> added a new method to the OSMImporter that allows you to turn on indexing of
> all nodes, regardless of whether they are points of interest or not.
>
> Just replace the old call to osmImporter.importFile(batchInserter,filePath)
> with instead osmImporter.importFile(batchInserter,filePath,true). The last
> parameter turns on indexing of all nodes. I've attached an image from the
> AWE product (based on uDig) that shows a large number of dynamic layers
> exported from the OSM model of Malmö, and you can see all nodes are visible.
> This is the output from the TestDynamicLayers unit test, run with the
> boolean set to true.
>
> If you are curious, the Neo Technology office is actually included in this
> image :-)
>
> I have just pushed the code to github, so you need to get the latest from
> there.
>
> Regards, Craig
>
> On Tue, Jan 18, 2011 at 9:27 PM, Craig Taverner  wrote:
>
>> Hi Bryce,
>>
>> Currently the OSM model in Neo4j Spatial only indexes the ways, which means
>> that when you do spatial searches on the layers, you are always talking
>> about the  ways. Whether this suites you or not depends on your specific use
>> case. You could search for the closest ways, and the use the
>> SpatialTopologyUtils to snap to the point node on the way that is closest to
>> your point of interest, which may give you the result you want.
>>
>> If you are specifically interested in only searching on nodes, not ways,
>> then there are two options, both requiring some refactoring of the OSM model
>> (ie. you need to make changes to Neo4j Spatial).
>>
>>    - In the OSMImporter code, simply add all nodes as Point geometries to
>>    the index. This is simple to code and will get what you want, but might 
>> not
>>    lead to the most efficient index, since both the ways and the nodes they 
>> are
>>    composed of get indexed in the same index.
>>    - Enhance the OSM model to support multiple indexes, for nodes, ways
>>    and relationships. This requires much more code, but opens the possibility
>>    to enhance the performance by allowing the index to be optimized for the
>>    geometries and densities seen in the dataset.
>>
>> The reasons we have not done this yet are:
>>
>>    - Existing use cases have not required it (but we are reaching cases
>>    that do now)
>>    - It is not clear yet which of the above options is the best overall
>>    (one index or several). Originally I believed in the multiple-index
>>    approach, mostly because points can be indexed with very different indexes
>>    than geometries (eg. we can even place lucene behind the point index, 
>> which
>>    we cannot do for geometries). But at the moment I am leaning back towards
>>    the single index approach (simpler code).
>>
>> So, I hope the approach of searching for close ways, and then using the
>> topology utils to snap to the closest point is the right solution for you.
>> Otherwise considering contributing to the updates necessary to complete the
>> point index :-)
>>
>> Regards, Craig
>>
>> On Tue, Jan 18, 2011 at 6:08 PM, bryce hendrix wrote:
>>
>>> Peter,
>>>
>>> I think my problem is more of understanding how the graph is built from
>>> OSM
>>> data. The method of find the closest edge gives me the way geometry, but
>>> (please correct me if I am wrong) I need to find the closest OSM node
>>> (Node
>>> with "lat" and "lon" properties) in the geometry.
>>>
>>> Thanks,
>>> Bryce
>>>
>>> On Tue, Jan 18, 2011 at 2:05 AM, Peter Neubauer <
>>> peter.neuba...@neotechnology.com> wrote:
>>>
>>> > Bryce,
>>> > are you looking for some kind of "snapping" to the nearest geometry? I
>>> > was doing something like that, Craig did a test on that, see
>>> >
>>> >
>>> https://github.com/neo4j/neo4j-spatial/blob/master/src/test/java/org/neo4j/gis/spatial/TestSpatialUtils.java#L53
>>> > ,
>>> > there is some basic support for that in
>>> >
>>> > 

[Neo4j] Neo4J and sharding

2011-01-18 Thread Luanne Misquitta
I was just wondering, have any of you ever felt the need to shard your
Neo4J store? If so, how did you manage it?

 

Regards

Luanne M.
Tech Lead

twitter / @luannem 
linkedin / http://in.linkedin.com/in/luannemisquitta
  
skype / luanne.misquitta
blog / http://thought-bytes.blogspot.com/
 
Saba. Power Up Your People.

 

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Searching for ways in imported OSM data

2011-01-18 Thread bryce hendrix
Thanks Craig! I'll not only play around with it tonight, but you nudged me
towards finally installing uDig.

Bryce

On Tue, Jan 18, 2011 at 6:45 PM, Craig Taverner  wrote:

> Hi Bryce,
>
> While I had this on my mind, I decided to look into the code and I went
> ahead developed the first approach. So now we index osm nodes in the r-tree
> also (in addition to ways). By default, only nodes that have tags are added
> to the index, because these are seen as 'points of interest', while all
> other nodes are assumed to only be interesting as part of a way. However, I
> added a new method to the OSMImporter that allows you to turn on indexing
> of
> all nodes, regardless of whether they are points of interest or not.
>
> Just replace the old call to osmImporter.importFile(batchInserter,filePath)
> with instead osmImporter.importFile(batchInserter,filePath,true). The last
> parameter turns on indexing of all nodes. I've attached an image from the
> AWE product (based on uDig) that shows a large number of dynamic layers
> exported from the OSM model of Malmö, and you can see all nodes are
> visible.
> This is the output from the TestDynamicLayers unit test, run with the
> boolean set to true.
>
> If you are curious, the Neo Technology office is actually included in this
> image :-)
>
> I have just pushed the code to github, so you need to get the latest from
> there.
>
> Regards, Craig
>
> On Tue, Jan 18, 2011 at 9:27 PM, Craig Taverner  wrote:
>
> > Hi Bryce,
> >
> > Currently the OSM model in Neo4j Spatial only indexes the ways, which
> means
> > that when you do spatial searches on the layers, you are always talking
> > about the  ways. Whether this suites you or not depends on your specific
> use
> > case. You could search for the closest ways, and the use the
> > SpatialTopologyUtils to snap to the point node on the way that is closest
> to
> > your point of interest, which may give you the result you want.
> >
> > If you are specifically interested in only searching on nodes, not ways,
> > then there are two options, both requiring some refactoring of the OSM
> model
> > (ie. you need to make changes to Neo4j Spatial).
> >
> >- In the OSMImporter code, simply add all nodes as Point geometries to
> >the index. This is simple to code and will get what you want, but
> might not
> >lead to the most efficient index, since both the ways and the nodes
> they are
> >composed of get indexed in the same index.
> >- Enhance the OSM model to support multiple indexes, for nodes, ways
> >and relationships. This requires much more code, but opens the
> possibility
> >to enhance the performance by allowing the index to be optimized for
> the
> >geometries and densities seen in the dataset.
> >
> > The reasons we have not done this yet are:
> >
> >- Existing use cases have not required it (but we are reaching cases
> >that do now)
> >- It is not clear yet which of the above options is the best overall
> >(one index or several). Originally I believed in the multiple-index
> >approach, mostly because points can be indexed with very different
> indexes
> >than geometries (eg. we can even place lucene behind the point index,
> which
> >we cannot do for geometries). But at the moment I am leaning back
> towards
> >the single index approach (simpler code).
> >
> > So, I hope the approach of searching for close ways, and then using the
> > topology utils to snap to the closest point is the right solution for
> you.
> > Otherwise considering contributing to the updates necessary to complete
> the
> > point index :-)
> >
> > Regards, Craig
> >
> > On Tue, Jan 18, 2011 at 6:08 PM, bryce hendrix  >wrote:
> >
> >> Peter,
> >>
> >> I think my problem is more of understanding how the graph is built from
> >> OSM
> >> data. The method of find the closest edge gives me the way geometry, but
> >> (please correct me if I am wrong) I need to find the closest OSM node
> >> (Node
> >> with "lat" and "lon" properties) in the geometry.
> >>
> >> Thanks,
> >> Bryce
> >>
> >> On Tue, Jan 18, 2011 at 2:05 AM, Peter Neubauer <
> >> peter.neuba...@neotechnology.com> wrote:
> >>
> >> > Bryce,
> >> > are you looking for some kind of "snapping" to the nearest geometry? I
> >> > was doing something like that, Craig did a test on that, see
> >> >
> >> >
> >>
> https://github.com/neo4j/neo4j-spatial/blob/master/src/test/java/org/neo4j/gis/spatial/TestSpatialUtils.java#L53
> >> > ,
> >> > there is some basic support for that in
> >> >
> >> > SpatialTopologyUtils.java.
> >> >
> >> > Does that help to get started? Feel free to add more utilities and
> >> > maybe a routing example, when you get it working.
> >> >
> >> > 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

Re: [Neo4j] Unfinished transaction - cannot open db

2011-01-18 Thread Andreas Bauer
Hi,

now I tried to use neoclipse(svn check out) with the new libs, but this doesn't 
work... Do I have to wait for a new release or what do I have to do in order to 
use the new libs?

Thanks,

Andi



Am 18.01.2011 um 20:04 schrieb Andreas Bauer :

> Hi,
> 
> I can send you the data. "Network" is just the name of the database. I made a 
> mistake, the exception occurs here:
> 
> GraphDatabaseService neo4j = new EmbeddedGraphDatabase( "network");
> 
> So my database is called network and after recovering the message I posted 
> last time occurs.
> 
> Cheers,
> 
> Andi
> 
> 
> Am 18.01.2011 um 10:01 schrieb Mattias Persson:
> 
>> This look very odd. The file "network" is not something that Neo4j
>> uses. What type of file system are you running this on? Also, would it
>> be possible for you to send some of the files to me offlist (all files
>> _not_ starting with "neostore" would maybe suffice).
>> 
>> Best,
>> Mattias
>> 
>> 2011/1/18 Andreas Bauer :
>>> Hi,
>>> 
>>> I tried to clean up my database with the new version. Seems to work. But 
>>> when cleanup is done and my program wants to start the database I get
>>> 
>>> Caused by: org.neo4j.graphdb.TransactionFailureException: Unable to start TM
>>>   at 
>>> org.neo4j.kernel.impl.transaction.TxManager.init(TxManager.java:192)
>>>   at org.neo4j.kernel.impl.transaction.TxModule.start(TxModule.java:97)
>>>   at org.neo4j.kernel.GraphDbInstance.start(GraphDbInstance.java:157)
>>>   at 
>>> org.neo4j.kernel.EmbeddedGraphDbImpl.(EmbeddedGraphDbImpl.java:168)
>>>   at 
>>> org.neo4j.kernel.EmbeddedGraphDatabase.(EmbeddedGraphDatabase.java:81)
>>>   at 
>>> org.neo4j.kernel.EmbeddedGraphDatabase.(EmbeddedGraphDatabase.java:65)
>>>   at 
>>> nu.buki.data.neo4j.SocialNetworkService.(SocialNetworkService.java:38)
>>> Caused by: java.io.FileNotFoundException: network (No such file or 
>>> directory)
>>>   at java.io.RandomAccessFile.open(Native Method)
>>>   at java.io.RandomAccessFile.(RandomAccessFile.java:212)
>>>   at java.io.RandomAccessFile.(RandomAccessFile.java:98)
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Searching for ways in imported OSM data

2011-01-18 Thread Craig Taverner
Hi Bryce,

Currently the OSM model in Neo4j Spatial only indexes the ways, which means
that when you do spatial searches on the layers, you are always talking
about the  ways. Whether this suites you or not depends on your specific use
case. You could search for the closest ways, and the use the
SpatialTopologyUtils to snap to the point node on the way that is closest to
your point of interest, which may give you the result you want.

If you are specifically interested in only searching on nodes, not ways,
then there are two options, both requiring some refactoring of the OSM model
(ie. you need to make changes to Neo4j Spatial).

   - In the OSMImporter code, simply add all nodes as Point geometries to
   the index. This is simple to code and will get what you want, but might not
   lead to the most efficient index, since both the ways and the nodes they are
   composed of get indexed in the same index.
   - Enhance the OSM model to support multiple indexes, for nodes, ways and
   relationships. This requires much more code, but opens the possibility to
   enhance the performance by allowing the index to be optimized for the
   geometries and densities seen in the dataset.

The reasons we have not done this yet are:

   - Existing use cases have not required it (but we are reaching cases that
   do now)
   - It is not clear yet which of the above options is the best overall (one
   index or several). Originally I believed in the multiple-index approach,
   mostly because points can be indexed with very different indexes than
   geometries (eg. we can even place lucene behind the point index, which we
   cannot do for geometries). But at the moment I am leaning back towards the
   single index approach (simpler code).

So, I hope the approach of searching for close ways, and then using the
topology utils to snap to the closest point is the right solution for you.
Otherwise considering contributing to the updates necessary to complete the
point index :-)

Regards, Craig

On Tue, Jan 18, 2011 at 6:08 PM, bryce hendrix wrote:

> Peter,
>
> I think my problem is more of understanding how the graph is built from OSM
> data. The method of find the closest edge gives me the way geometry, but
> (please correct me if I am wrong) I need to find the closest OSM node (Node
> with "lat" and "lon" properties) in the geometry.
>
> Thanks,
> Bryce
>
> On Tue, Jan 18, 2011 at 2:05 AM, Peter Neubauer <
> peter.neuba...@neotechnology.com> wrote:
>
> > Bryce,
> > are you looking for some kind of "snapping" to the nearest geometry? I
> > was doing something like that, Craig did a test on that, see
> >
> >
> https://github.com/neo4j/neo4j-spatial/blob/master/src/test/java/org/neo4j/gis/spatial/TestSpatialUtils.java#L53
> > ,
> > there is some basic support for that in
> >
> > SpatialTopologyUtils.java.
> >
> > Does that help to get started? Feel free to add more utilities and
> > maybe a routing example, when you get it working.
> >
> > 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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
> >
> >
> >
> > On Tue, Jan 18, 2011 at 5:50 AM, bryce hendrix 
> > wrote:
> > > Craig,
> > >
> > > I've ran into a bit of a stumbling block. I am attempting to do find a
> > > simple route using A* from 2 nodes on 2 different ways. What is the
> best
> > way
> > > to find the points closest to 2 reference points which are on ways?
> > Assuming
> > > I've got those nodes, is there anything special I have to do, other
> than
> > > setting up the estimate and cost evaluators?
> > >
> > > If I can figure this out, I'll submit my example back to you guys. I'm
> > > excited about this stuff, but I seem to be discovering the limits of
> the
> > > docs.
> > >
> > > Bryce
> > >
> > > On Sun, Jan 16, 2011 at 7:11 PM, Craig Taverner 
> > wrote:
> > >
> > >> Great that they all work :-)
> > >>
> > >> Good luck with the rest of the project and keep us posted, we're
> > interested
> > >> in any feedback on the API.
> > >>
> > >> (getting lat/long mixed up is one of those things we all keep doing,
> I'm
> > >> pretty sure I did it once as recently as last month ... ;-)
> > >>
> > >> On Sun, Jan 16, 2011 at 11:52 PM, bryce hendrix <
> brycehend...@gmail.com
> > >> >wrote:
> > >>
> > >> > Craig, Peter,
> > >> >
> > >> > Its useful if I get the latitude and longitude in the correct order
> > for
> > >> the
> > >> > Point. Ugh. I've found
> > >> > that SearchPointsWithinOrthodromicDistance, SearchClosest,
> > >> > and SpatialTopologyUtils.findClosestEdges all work for me. Looks
> like
> > my
> > >> > project is well on its way now, thanks for the help.
> > >> >
> > >> > Bryce
> > >> >
> > >> > On Sun, Jan 16, 2011 at 3:16 PM, Cra

Re: [Neo4j] Unfinished transaction - cannot open db

2011-01-18 Thread Andreas Bauer
Hi,

I can send you the data. "Network" is just the name of the database. I made a 
mistake, the exception occurs here:

GraphDatabaseService neo4j = new EmbeddedGraphDatabase( "network");

So my database is called network and after recovering the message I posted last 
time occurs.

Cheers,

Andi


Am 18.01.2011 um 10:01 schrieb Mattias Persson:

> This look very odd. The file "network" is not something that Neo4j
> uses. What type of file system are you running this on? Also, would it
> be possible for you to send some of the files to me offlist (all files
> _not_ starting with "neostore" would maybe suffice).
> 
> Best,
> Mattias
> 
> 2011/1/18 Andreas Bauer :
>> Hi,
>> 
>> I tried to clean up my database with the new version. Seems to work. But 
>> when cleanup is done and my program wants to start the database I get
>> 
>> Caused by: org.neo4j.graphdb.TransactionFailureException: Unable to start TM
>>at 
>> org.neo4j.kernel.impl.transaction.TxManager.init(TxManager.java:192)
>>at org.neo4j.kernel.impl.transaction.TxModule.start(TxModule.java:97)
>>at org.neo4j.kernel.GraphDbInstance.start(GraphDbInstance.java:157)
>>at 
>> org.neo4j.kernel.EmbeddedGraphDbImpl.(EmbeddedGraphDbImpl.java:168)
>>at 
>> org.neo4j.kernel.EmbeddedGraphDatabase.(EmbeddedGraphDatabase.java:81)
>>at 
>> org.neo4j.kernel.EmbeddedGraphDatabase.(EmbeddedGraphDatabase.java:65)
>>at 
>> nu.buki.data.neo4j.SocialNetworkService.(SocialNetworkService.java:38)
>> Caused by: java.io.FileNotFoundException: network (No such file or directory)
>>at java.io.RandomAccessFile.open(Native Method)
>>at java.io.RandomAccessFile.(RandomAccessFile.java:212)
>>at java.io.RandomAccessFile.(RandomAccessFile.java:98)
>>at org.neo4j.kernel.impl.transaction.TxLog.(TxLog.java:76)
>>at 
>> org.neo4j.kernel.impl.transaction.TxManager.init(TxManager.java:148)
>>... 6 more
>> 
>> 
>> The exception occurs here:
>> 
>> GraphDatabaseService neo4j = new EmbeddedGraphDatabase( "cep");
>> 
>> This always work in the old versions. Do I have to change something?
>> 
>> Cheers,
>> 
>> Andi
>> 
>> 
>> 
>> Am 17.01.2011 um 22:41 schrieb Rick Bullotta:
>> 
>>> So the issue was in Neo and not Neoclipse?  If so, is this a recommended
>>> patch for everyone running Neo 1.2 who might encounter a recovery/restart
>>> situation, or is this something specific to a Neoclipse issue?
>>> 
>>> Thanks,
>>> 
>>> Rick
>>> 
>>> -Original Message-
>>> From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On
>>> Behalf Of Anders Nawroth
>>> Sent: Monday, January 17, 2011 4:10 PM
>>> To: Neo4j user discussions
>>> Subject: Re: [Neo4j] Unfinished transaction - cannot open db
>>> 
>>> Hi!
>>> 
>>> 2011-01-17 20:42, Andreas Bauer:
 Great! Thanks alot! Let me know when and where I can download the update!
>>> 
>>> The snapshot version of the download package is found here:
>>> 
>>> http://neo4j.org/get?file=neo4j-1.3-SNAPSHOT-unix.tar.gz
>>> http://neo4j.org/get?file=neo4j-1.3-SNAPSHOT-windows.zip
>>> 
>>> 
>>> /anders
>>> 
>>> 
 
 Cheers,
 
 Andi
 
 Am 17.01.2011 um 10:03 schrieb Mattias Persson:
 
> Hi again and sorry for late response,
> 
> This has been some nut to crack, but finally I think the bug is resolved.
> It's committed and will be available in the next milestone, but is
>>> already
> available (at least within the next hour or so) in SNAPSHOT builds from
>>> the
> neo4j maven repository.
> 
> I'd like to thank you for being persistent in giving back information and
> being very helpful!
> 
> If the issue is still there please report back.
> 
> 
> Best,
> Mattias
> 
> 2011/1/14 Andreas Bauer
> 
>> Hi,
>> 
>> on the classpath are the libs  that come with neoclipse, so geronimo and
>> all the neo4j-libs including neo4j-lucene-index-0.2-1.2.jar.
>> 
>> When I start the database in neoclipse the following messages are
>>> written:
>> 
>> Jan 14 18:17:02 CET 2011: XaResourceManager[./nioneo_logical.log]
>>> sorting 0
>> xids
>> Fri Jan 14 18:17:02 CET 2011: XaResourceManager[./nioneo_logical.log]
>> checkRecoveryComplete 0 xids
>> Fri Jan 14 18:17:02 CET 2011: ./neostore.relationshiptypestore.db.names
>> rebuild id generator, highId=5 defragged count=0
>> Fri Jan 14 18:17:02 CET 2011: ./neostore.propertystore.db.index.keys
>> rebuild id generator, highId=3 defragged count=0
>> Fri Jan 14 18:17:02 CET 2011: ./neostore.propertystore.db.index rebuild
>>> id
>> generator, highId=2 defragged count=0
>> Fri Jan 14 18:17:03 CET 2011: ./neostore.propertystore.db.strings
>>> rebuild
>> id generator, highId=1788 defragged count=0
>> Fri Jan 14 18:17:03 CET 2011: ./neostore.propertystore.db.arrays rebuild
>>> id
>> generator, highId=1 defragged count=0
>> Fri Jan 14 18:17:03 CET

Re: [Neo4j] Neo Disk Storage Question/Issue Re: String Properties

2011-01-18 Thread Rick Bullotta
Thanks for the info. We're trying to maintain some level of HA/horizontal
scaling capabilities for our blob storage as well, so the file system isn't
really a practical alternative for us.  When in the Amazon cloud, we could
use S3, but we're trying to have a consistent approach for on-premise,
embedded, and cloud scenarios.  I suppose we could incorporate something
like CloudDB, MongoDB, but I'm trying to keep in the Java domain if
possible.  Does anyone have any experience with Jackrabbit?

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On
Behalf Of Tobias Ivarsson
Sent: Tuesday, January 18, 2011 12:36 PM
To: Neo4j user discussions
Subject: Re: [Neo4j] Neo Disk Storage Question/Issue Re: String Properties

Sorry, my message got cropped somehow. This paragraph should have been
completed:

As a general practice I would advice against storing large data values as
properties in Neo4j. A few odd ones can be ok, but for storing a lot of
large blobs it is better to store that in some other persistance mechanism.
For example on the file system.

Cheers,
Tobias

On Tue, Jan 18, 2011 at 6:34 PM, Tobias Ivarsson <
tobias.ivars...@neotechnology.com> wrote:

> That space will be recovered after the store has been shut down. So the
> next time you start up those blocks will be reused. Note however that you
> need a clean shutdown to be able to reuse that space.
>
> As a general practice I would advice against storing large data values as
> properties in Neo4j. A few odd ones can be ok, but for storing a lot of
> large blobs it is better to store that in a
>
> We are however thinking of recycling the space for properties
> more aggressively in (near) future versions of Neo4j. Since the addresses
> for the property blocks are managed completely internally, this would be
> safe.
>
> Cheers,
> Tobias
>
>
> On Tue, Jan 18, 2011 at 2:35 PM, Rick Bullotta <
> rick.bullo...@burningskysoftware.com> wrote:
>
>> If I have a string property on a node, and I overwrite it with a new
>> value,
>> it *appears* that the disk space for the previous value is still
allocated
>> in the neostore.propertystore.db.strings file.  I say this because the
>> value
>> happens to be rather large (about 2MB), and after a few writes, I noticed
>> the file grow quite large.  Will this space ever be recovered?
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Rick
>>
>>
>>
>>
>>
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
>
>
>
> --
> Tobias Ivarsson 
> Hacker, Neo Technology
> www.neotechnology.com
> Cellphone: +46 706 534857
>



-- 
Tobias Ivarsson 
Hacker, Neo Technology
www.neotechnology.com
Cellphone: +46 706 534857
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Shell, LuceneIndex and Matching Questions

2011-01-18 Thread Konstanze . Lorenz
Hello List,

arent there any clues for this problems?

Regards

-Ursprüngliche Nachricht-
Von: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] Im 
Auftrag von Konstanze.Lorenz
Gesendet: Dienstag, 11. Januar 2011 14:38
An: Neo4j user discussions
Betreff: [Neo4j] Shell, LuceneIndex and Matching Questions

Hello and a happy new year List,

I have got a problem with the PatternMatcher.getMatcher().match(PatternNode 
start, Node start)
The returntype should be an Iterable, but it doesnt behave like an Iterable. I 
could not call it twice in a for-each-loop.
A simple example:
--
Iterable iter = matcher.match(matchStartNode, neoStartNode);
for(PatternMatch i : iter){
System.out.println(i);
}
System.out.println("second call");
for(PatternMatch i : iter){
System.out.println(i);
}

Results on the console:
org.neo4j.graphmatching.PatternMatch@1542a75
org.neo4j.graphmatching.PatternMatch@af993e
Second call


I'm expecting the two Patternmatch-objects after the second call too.
---
The second problem concerns the Index. get(String key, Object value) 
method.
If the Index has the LuceneIndexProvider.Exact_config it is not possible 
to get a result if a value of type number is called AND the transaction is 
restarted after adding the key-entity-value-triple to the index. I know the 
value is correctly in the index, because the Index.query() Method returns 
a result. Only the get-Method doesnt.
By the way, the get-Method works fine with String, but it is necessary for the 
project to handle with Number.
Here is a small example:
-
String indexName = "number";
String key = "anyNumber";
beginTx();  
Index indexService = neo.index().forNodes(indexName, 
LuceneIndexProvider.EXACT_CONFIG);

int property50 = 50;

Node numberNode50 = neo.createNode(); 
numberNode50.setProperty(key, property50);
indexService.add(numberNode50, 
key,ValueContext.numeric(property50));
restartTx();
System.out.println(indexService.get(key, 
ValueContext.numeric(property50)).getSingle());
---
Results on the console:
Null

If I do not restartTx(), then the result is the expected node numberNode50
-

The third problem is about the internal shell. If I start the shell from local 
path it runs into a loop, with repeating this line:
neo4j-sh (0)$ java.lang.NullPointerException: nullnull
Any clues how to resolve this?

All above problems occur for the 1.2 release.


Regards,
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo Disk Storage Question/Issue Re: String Properties

2011-01-18 Thread Tobias Ivarsson
Sorry, my message got cropped somehow. This paragraph should have been
completed:

As a general practice I would advice against storing large data values as
properties in Neo4j. A few odd ones can be ok, but for storing a lot of
large blobs it is better to store that in some other persistance mechanism.
For example on the file system.

Cheers,
Tobias

On Tue, Jan 18, 2011 at 6:34 PM, Tobias Ivarsson <
tobias.ivars...@neotechnology.com> wrote:

> That space will be recovered after the store has been shut down. So the
> next time you start up those blocks will be reused. Note however that you
> need a clean shutdown to be able to reuse that space.
>
> As a general practice I would advice against storing large data values as
> properties in Neo4j. A few odd ones can be ok, but for storing a lot of
> large blobs it is better to store that in a
>
> We are however thinking of recycling the space for properties
> more aggressively in (near) future versions of Neo4j. Since the addresses
> for the property blocks are managed completely internally, this would be
> safe.
>
> Cheers,
> Tobias
>
>
> On Tue, Jan 18, 2011 at 2:35 PM, Rick Bullotta <
> rick.bullo...@burningskysoftware.com> wrote:
>
>> If I have a string property on a node, and I overwrite it with a new
>> value,
>> it *appears* that the disk space for the previous value is still allocated
>> in the neostore.propertystore.db.strings file.  I say this because the
>> value
>> happens to be rather large (about 2MB), and after a few writes, I noticed
>> the file grow quite large.  Will this space ever be recovered?
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Rick
>>
>>
>>
>>
>>
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
>
>
>
> --
> Tobias Ivarsson 
> Hacker, Neo Technology
> www.neotechnology.com
> Cellphone: +46 706 534857
>



-- 
Tobias Ivarsson 
Hacker, Neo Technology
www.neotechnology.com
Cellphone: +46 706 534857
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Neo Disk Storage Question/Issue Re: String Properties

2011-01-18 Thread Tobias Ivarsson
That space will be recovered after the store has been shut down. So the next
time you start up those blocks will be reused. Note however that you need a
clean shutdown to be able to reuse that space.

As a general practice I would advice against storing large data values as
properties in Neo4j. A few odd ones can be ok, but for storing a lot of
large blobs it is better to store that in a

We are however thinking of recycling the space for properties
more aggressively in (near) future versions of Neo4j. Since the addresses
for the property blocks are managed completely internally, this would be
safe.

Cheers,
Tobias

On Tue, Jan 18, 2011 at 2:35 PM, Rick Bullotta <
rick.bullo...@burningskysoftware.com> wrote:

> If I have a string property on a node, and I overwrite it with a new value,
> it *appears* that the disk space for the previous value is still allocated
> in the neostore.propertystore.db.strings file.  I say this because the
> value
> happens to be rather large (about 2MB), and after a few writes, I noticed
> the file grow quite large.  Will this space ever be recovered?
>
>
>
> Thanks,
>
>
>
> Rick
>
>
>
>
>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Tobias Ivarsson 
Hacker, Neo Technology
www.neotechnology.com
Cellphone: +46 706 534857
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Searching for ways in imported OSM data

2011-01-18 Thread bryce hendrix
Peter,

I think my problem is more of understanding how the graph is built from OSM
data. The method of find the closest edge gives me the way geometry, but
(please correct me if I am wrong) I need to find the closest OSM node (Node
with "lat" and "lon" properties) in the geometry.

Thanks,
Bryce

On Tue, Jan 18, 2011 at 2:05 AM, Peter Neubauer <
peter.neuba...@neotechnology.com> wrote:

> Bryce,
> are you looking for some kind of "snapping" to the nearest geometry? I
> was doing something like that, Craig did a test on that, see
>
> https://github.com/neo4j/neo4j-spatial/blob/master/src/test/java/org/neo4j/gis/spatial/TestSpatialUtils.java#L53
> ,
> there is some basic support for that in
>
> SpatialTopologyUtils.java.
>
> Does that help to get started? Feel free to add more utilities and
> maybe a routing example, when you get it working.
>
> 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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>
>
>
> On Tue, Jan 18, 2011 at 5:50 AM, bryce hendrix 
> wrote:
> > Craig,
> >
> > I've ran into a bit of a stumbling block. I am attempting to do find a
> > simple route using A* from 2 nodes on 2 different ways. What is the best
> way
> > to find the points closest to 2 reference points which are on ways?
> Assuming
> > I've got those nodes, is there anything special I have to do, other than
> > setting up the estimate and cost evaluators?
> >
> > If I can figure this out, I'll submit my example back to you guys. I'm
> > excited about this stuff, but I seem to be discovering the limits of the
> > docs.
> >
> > Bryce
> >
> > On Sun, Jan 16, 2011 at 7:11 PM, Craig Taverner 
> wrote:
> >
> >> Great that they all work :-)
> >>
> >> Good luck with the rest of the project and keep us posted, we're
> interested
> >> in any feedback on the API.
> >>
> >> (getting lat/long mixed up is one of those things we all keep doing, I'm
> >> pretty sure I did it once as recently as last month ... ;-)
> >>
> >> On Sun, Jan 16, 2011 at 11:52 PM, bryce hendrix  >> >wrote:
> >>
> >> > Craig, Peter,
> >> >
> >> > Its useful if I get the latitude and longitude in the correct order
> for
> >> the
> >> > Point. Ugh. I've found
> >> > that SearchPointsWithinOrthodromicDistance, SearchClosest,
> >> > and SpatialTopologyUtils.findClosestEdges all work for me. Looks like
> my
> >> > project is well on its way now, thanks for the help.
> >> >
> >> > Bryce
> >> >
> >> > On Sun, Jan 16, 2011 at 3:16 PM, Craig Taverner 
> >> wrote:
> >> >
> >> > > The SearchPointsWithinOrthodromicDistance basically does a search on
> a
> >> > > rectangular bounding box, and then inside the result set filters by
> >> > > distance
> >> > > from the center. The filter probably works only on points as implied
> by
> >> > the
> >> > > class name.
> >> > >
> >> > > The SpatialTopologyUtils class has a method findClosestEdge, which
> will
> >> > do
> >> > > what you are looking for. If you call it without a distance value,
> it
> >> > will
> >> > > take 1% of the total span of your layer as the search window, so if
> >> this
> >> > > does not make sense for your data (eg. your layer covers a small
> area,
> >> as
> >> > > you hinted at), then pass in the distance in units of the coordinate
> >> > system
> >> > > of the layer (probably WGS84, degrees, if you are using only OSM
> data).
> >> > Try
> >> > > it out and let us know.
> >> > >
> >> > > See:
> >> > >
> >> > >   -
> >> > >
> >> > >
> >> >
> >>
> https://github.com/neo4j/neo4j-spatial/blob/master/src/main/java/org/neo4j/gis/spatial/SpatialTopologyUtils.java
> >> > >   -
> >> > >
> >> > >
> >> >
> >>
> https://github.com/neo4j/neo4j-spatial/blob/master/src/test/java/org/neo4j/gis/spatial/TestSpatialUtils.java
> >> > >
> >> > >
> >> > > On Sun, Jan 16, 2011 at 11:19 AM, Peter Neubauer <
> >> > > peter.neuba...@neotechnology.com> wrote:
> >> > >
> >> > > > Bryce,
> >> > > > I think (Craig, correct me if I'm wrong) you need to have a Point
> >> > > > layer to be able to do that search. The default OSM layer is
> >> > > > containing a lot of geometries, so I think you first should define
> a
> >> > > > layer on top of the full imported one, then search. I did
> something
> >> > > > like that in another spike, see
> >> > > >
> >> > > >
> >> > >
> >> >
> >>
> https://github.com/popdevelop/snapplr/blob/master/server_java/src/main/java/com/geosnappr/TaginfoImporter.java#L312
> >> > > >
> >> > > > The layer is defined with something like
> >> > > >
> >> > > >
> >> > >
> >> >
> >>
> https://github.com/neo4j/neo4j-spatial/blob/master/src/test/java/org/neo4j/gis/spatial/TestDynamicLayers.java#L26
> >> > > > on top of the imported full data layer.
> >> > > >
> >> > > > Does that help?
> >> > > >
> >> > > > Cheers,
> >

[Neo4j] Neo Disk Storage Question/Issue Re: String Properties

2011-01-18 Thread Rick Bullotta
If I have a string property on a node, and I overwrite it with a new value,
it *appears* that the disk space for the previous value is still allocated
in the neostore.propertystore.db.strings file.  I say this because the value
happens to be rather large (about 2MB), and after a few writes, I noticed
the file grow quite large.  Will this space ever be recovered?

 

Thanks,

 

Rick

 

 

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] neo4j API, jo4neo, Spring Data thoughts, experiences and advice?

2011-01-18 Thread Peter Neubauer
Hi 向雅,
thanks for getting back with the information - do let the community
know how things are evolving for you, we are happy to support you if
you encounter any questions regarding Neo4j and Spring Datastore
Graph. It's still not really stable, so any feedback is highly
appreciated.

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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Thu, Jan 13, 2011 at 4:17 PM, 向雅  wrote:
> Hi,
> I'm working a workflow project now, which use cglib do runtime weave.
> there have a problem: runtime cache and classes-node pairs must
> track,because it's runtime classes. Considering replace with aspectj.
> BTW I will start a new thread to discuss with all about Node proxy. I
> already have 2 wills, my own:)
>
> Persistence, those projects you mentioned, I really not recommend, I
> doubt your team can accept some relations habit.
> At this level, neo just a maps, your model maybe not satisfy design
> concepts from owner of those projects.
> And, the java type system map really not piece of pie. because of
> design of java self,  do such thing not easier than rockets:-0 JUST
> IMV.
> Even so, more important, the core concept is, NO NEED to write POJO
> class to represent model. That's great.
>
> As to query, no idea, I'm fighting with model traverse and indexing.
>
> BTW, the before workflow project employ db4o, its stable version now,
> is development version when our project running.
> In my personal feeling, the model is more easy if use neo, in other
> words, by Graph. so our project replace db4o by neo4j.:)
> Just as stated in Neo4j wikis, you must really do a serious thinking
> in graph for your mode.
> Once the nature of thing revealed, the then thing, hehe, POP:)
>
> 致敬
> 向雅
>
>
>
> 2010/12/13 Donovan Muller :
>> Hi,
>>
>> I'm busy with a new project and have chosen neo4j (n00b, still learning...)
>> as the datastore.
>> I'm trying to decide on whether to use neo4j API directly or an annotation
>> based framework for persisting, querying, POJO mapping for nodes etc.
>>
>> I've found two such frameworks:
>>  jo4neo - http://code.google.com/p/jo4neo/
>>  Spring Data - http://www.springsource.org/spring-data
>>
>> Can anybody on the list please tell me if they've used either of these
>> frameworks before,
>> if they're recommended over neo4j API for simple persistance/querying, etc.,
>> pros/cons, performance difference in comparison to API and which one is
>> better?
>>
>> Thanks,
>> Keep up the good work neo4j!
>>
>> Cheers
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Unfinished transaction - cannot open db

2011-01-18 Thread Mattias Persson
This look very odd. The file "network" is not something that Neo4j
uses. What type of file system are you running this on? Also, would it
be possible for you to send some of the files to me offlist (all files
_not_ starting with "neostore" would maybe suffice).

Best,
Mattias

2011/1/18 Andreas Bauer :
> Hi,
>
> I tried to clean up my database with the new version. Seems to work. But when 
> cleanup is done and my program wants to start the database I get
>
> Caused by: org.neo4j.graphdb.TransactionFailureException: Unable to start TM
>        at org.neo4j.kernel.impl.transaction.TxManager.init(TxManager.java:192)
>        at org.neo4j.kernel.impl.transaction.TxModule.start(TxModule.java:97)
>        at org.neo4j.kernel.GraphDbInstance.start(GraphDbInstance.java:157)
>        at 
> org.neo4j.kernel.EmbeddedGraphDbImpl.(EmbeddedGraphDbImpl.java:168)
>        at 
> org.neo4j.kernel.EmbeddedGraphDatabase.(EmbeddedGraphDatabase.java:81)
>        at 
> org.neo4j.kernel.EmbeddedGraphDatabase.(EmbeddedGraphDatabase.java:65)
>        at 
> nu.buki.data.neo4j.SocialNetworkService.(SocialNetworkService.java:38)
> Caused by: java.io.FileNotFoundException: network (No such file or directory)
>        at java.io.RandomAccessFile.open(Native Method)
>        at java.io.RandomAccessFile.(RandomAccessFile.java:212)
>        at java.io.RandomAccessFile.(RandomAccessFile.java:98)
>        at org.neo4j.kernel.impl.transaction.TxLog.(TxLog.java:76)
>        at org.neo4j.kernel.impl.transaction.TxManager.init(TxManager.java:148)
>        ... 6 more
>
>
> The exception occurs here:
>
> GraphDatabaseService neo4j = new EmbeddedGraphDatabase( "cep");
>
> This always work in the old versions. Do I have to change something?
>
> Cheers,
>
> Andi
>
>
>
> Am 17.01.2011 um 22:41 schrieb Rick Bullotta:
>
>> So the issue was in Neo and not Neoclipse?  If so, is this a recommended
>> patch for everyone running Neo 1.2 who might encounter a recovery/restart
>> situation, or is this something specific to a Neoclipse issue?
>>
>> Thanks,
>>
>> Rick
>>
>> -Original Message-
>> From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On
>> Behalf Of Anders Nawroth
>> Sent: Monday, January 17, 2011 4:10 PM
>> To: Neo4j user discussions
>> Subject: Re: [Neo4j] Unfinished transaction - cannot open db
>>
>> Hi!
>>
>> 2011-01-17 20:42, Andreas Bauer:
>>> Great! Thanks alot! Let me know when and where I can download the update!
>>
>> The snapshot version of the download package is found here:
>>
>> http://neo4j.org/get?file=neo4j-1.3-SNAPSHOT-unix.tar.gz
>> http://neo4j.org/get?file=neo4j-1.3-SNAPSHOT-windows.zip
>>
>>
>> /anders
>>
>>
>>>
>>> Cheers,
>>>
>>> Andi
>>>
>>> Am 17.01.2011 um 10:03 schrieb Mattias Persson:
>>>
 Hi again and sorry for late response,

 This has been some nut to crack, but finally I think the bug is resolved.
 It's committed and will be available in the next milestone, but is
>> already
 available (at least within the next hour or so) in SNAPSHOT builds from
>> the
 neo4j maven repository.

 I'd like to thank you for being persistent in giving back information and
 being very helpful!

 If the issue is still there please report back.


 Best,
 Mattias

 2011/1/14 Andreas Bauer

> Hi,
>
> on the classpath are the libs  that come with neoclipse, so geronimo and
> all the neo4j-libs including neo4j-lucene-index-0.2-1.2.jar.
>
> When I start the database in neoclipse the following messages are
>> written:
>
> Jan 14 18:17:02 CET 2011: XaResourceManager[./nioneo_logical.log]
>> sorting 0
> xids
> Fri Jan 14 18:17:02 CET 2011: XaResourceManager[./nioneo_logical.log]
> checkRecoveryComplete 0 xids
> Fri Jan 14 18:17:02 CET 2011: ./neostore.relationshiptypestore.db.names
> rebuild id generator, highId=5 defragged count=0
> Fri Jan 14 18:17:02 CET 2011: ./neostore.propertystore.db.index.keys
> rebuild id generator, highId=3 defragged count=0
> Fri Jan 14 18:17:02 CET 2011: ./neostore.propertystore.db.index rebuild
>> id
> generator, highId=2 defragged count=0
> Fri Jan 14 18:17:03 CET 2011: ./neostore.propertystore.db.strings
>> rebuild
> id generator, highId=1788 defragged count=0
> Fri Jan 14 18:17:03 CET 2011: ./neostore.propertystore.db.arrays rebuild
>> id
> generator, highId=1 defragged count=0
> Fri Jan 14 18:17:03 CET 2011: ./neostore.propertystore.db rebuild id
> generator, highId=2924 defragged count=0
> Fri Jan 14 18:17:03 CET 2011: ./neostore.relationshipstore.db rebuild id
> generator, highId=1137 defragged count=0
> Fri Jan 14 18:17:03 CET 2011: ./neostore.nodestore.db rebuild id
>> generator,
> highId=2019 defragged count=0
> Fri Jan 14 18:17:03 CET 2011: ./neostore rebuild id generator, highId=4
> defragged count=0
> Fri Jan 14 18:17:03 CET 2011: XaResourceManager[./nioneo_logical.log]
> recovery com

Re: [Neo4j] Searching for ways in imported OSM data

2011-01-18 Thread Peter Neubauer
Bryce,
are you looking for some kind of "snapping" to the nearest geometry? I
was doing something like that, Craig did a test on that, see
https://github.com/neo4j/neo4j-spatial/blob/master/src/test/java/org/neo4j/gis/spatial/TestSpatialUtils.java#L53,
there is some basic support for that in

SpatialTopologyUtils.java.

Does that help to get started? Feel free to add more utilities and
maybe a routing example, when you get it working.

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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Tue, Jan 18, 2011 at 5:50 AM, bryce hendrix  wrote:
> Craig,
>
> I've ran into a bit of a stumbling block. I am attempting to do find a
> simple route using A* from 2 nodes on 2 different ways. What is the best way
> to find the points closest to 2 reference points which are on ways? Assuming
> I've got those nodes, is there anything special I have to do, other than
> setting up the estimate and cost evaluators?
>
> If I can figure this out, I'll submit my example back to you guys. I'm
> excited about this stuff, but I seem to be discovering the limits of the
> docs.
>
> Bryce
>
> On Sun, Jan 16, 2011 at 7:11 PM, Craig Taverner  wrote:
>
>> Great that they all work :-)
>>
>> Good luck with the rest of the project and keep us posted, we're interested
>> in any feedback on the API.
>>
>> (getting lat/long mixed up is one of those things we all keep doing, I'm
>> pretty sure I did it once as recently as last month ... ;-)
>>
>> On Sun, Jan 16, 2011 at 11:52 PM, bryce hendrix > >wrote:
>>
>> > Craig, Peter,
>> >
>> > Its useful if I get the latitude and longitude in the correct order for
>> the
>> > Point. Ugh. I've found
>> > that SearchPointsWithinOrthodromicDistance, SearchClosest,
>> > and SpatialTopologyUtils.findClosestEdges all work for me. Looks like my
>> > project is well on its way now, thanks for the help.
>> >
>> > Bryce
>> >
>> > On Sun, Jan 16, 2011 at 3:16 PM, Craig Taverner 
>> wrote:
>> >
>> > > The SearchPointsWithinOrthodromicDistance basically does a search on a
>> > > rectangular bounding box, and then inside the result set filters by
>> > > distance
>> > > from the center. The filter probably works only on points as implied by
>> > the
>> > > class name.
>> > >
>> > > The SpatialTopologyUtils class has a method findClosestEdge, which will
>> > do
>> > > what you are looking for. If you call it without a distance value, it
>> > will
>> > > take 1% of the total span of your layer as the search window, so if
>> this
>> > > does not make sense for your data (eg. your layer covers a small area,
>> as
>> > > you hinted at), then pass in the distance in units of the coordinate
>> > system
>> > > of the layer (probably WGS84, degrees, if you are using only OSM data).
>> > Try
>> > > it out and let us know.
>> > >
>> > > See:
>> > >
>> > >   -
>> > >
>> > >
>> >
>> https://github.com/neo4j/neo4j-spatial/blob/master/src/main/java/org/neo4j/gis/spatial/SpatialTopologyUtils.java
>> > >   -
>> > >
>> > >
>> >
>> https://github.com/neo4j/neo4j-spatial/blob/master/src/test/java/org/neo4j/gis/spatial/TestSpatialUtils.java
>> > >
>> > >
>> > > On Sun, Jan 16, 2011 at 11:19 AM, Peter Neubauer <
>> > > peter.neuba...@neotechnology.com> wrote:
>> > >
>> > > > Bryce,
>> > > > I think (Craig, correct me if I'm wrong) you need to have a Point
>> > > > layer to be able to do that search. The default OSM layer is
>> > > > containing a lot of geometries, so I think you first should define a
>> > > > layer on top of the full imported one, then search. I did something
>> > > > like that in another spike, see
>> > > >
>> > > >
>> > >
>> >
>> https://github.com/popdevelop/snapplr/blob/master/server_java/src/main/java/com/geosnappr/TaginfoImporter.java#L312
>> > > >
>> > > > The layer is defined with something like
>> > > >
>> > > >
>> > >
>> >
>> https://github.com/neo4j/neo4j-spatial/blob/master/src/test/java/org/neo4j/gis/spatial/TestDynamicLayers.java#L26
>> > > > on top of the imported full data layer.
>> > > >
>> > > > Does that help?
>> > > >
>> > > > 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://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing
>> > party.
>> > > >
>> > > >
>> > > >
>> > > > On Sat, Jan 15, 2011 at 10:58 PM, bryce hendrix <
>> > brycehend...@gmail.com>
>> > > > wrote:
>> > > > > I'm pretty new to neo4j, so please excuse me if this is a FAQ.
>> > > > >
>> > > > > I exported