Re: [Neo4j] path finding using OSM ways

2011-05-31 Thread Craig Taverner
Hi Bryce, Nice to see you back. The OSM data model in Neo4j-Spatial, created by the OSMImporter, is designed to mimic the complete contents of the XML files provided for OSM. As it is, this is not ideal for routing because it traces the complete set of nodes for the ways, while for routing you

[Neo4j] Sample Linear Referencing Functions in Neo4j Spatial and GSoC

2011-06-02 Thread Craig Taverner
Hi, Recently someone asked a question on StackOverflow, if Neo4j Spatial was capable of one of the Oracle geoprocessing funtions, SDO_LRS.LOCATE_PT specifically. Since this is related to the ongoing GSoC projects for Neo4j Spatial, I thought I would do a quick investigation. What I found was that

Re: [Neo4j] [SoC] Re: GSoC 2011 Weekly report - OSM data mining and editing capabilities in uDig and Geotools

2011-06-05 Thread Craig Taverner
Hi Mirco, Sounds like progress. Some suggestions: - I do not think you need to change the code for neo4j and udig, but only for neo4j-spatial and udig-community/neo4j. It is OK to make clones of those so you have the code for review, but they are quite core, and you should not need

Re: [Neo4j] neo4j spatial bounding box vs. lat/lon

2011-06-07 Thread Craig Taverner
Hi, The bounding boxes are used by the RTree index, which is a typical way to index spatial data. For Point data, the lat/long and the bounding box are the same thing, but for other shapes (streets/LineString and Polygons), the bounding box is quite different to the actual geometry (which is not

Re: [Neo4j] neo4j spatial bounding box vs. lat/lon

2011-06-07 Thread Craig Taverner
of a set of points, rather than individual points. So the query is, find the nodes where the given point falls inside their bounding boxes. Can I do this with REST? Thanks! On Tue, Jun 7, 2011 at 11:34 AM, Craig Taverner cr...@amanzi.com wrote: Hi, The bounding boxes are used by the RTree

Re: [Neo4j] Sample Linear Referencing Functions in Neo4j Spatial and GSoC

2011-06-07 Thread Craig Taverner
://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 Thu, Jun 2, 2011 at 2:13 PM, Craig Taverner cr...@amanzi.com wrote: Hi, Recently

Re: [Neo4j] GSoC 2011 Neo4j Geoprocessing | Weekly Report #2

2011-06-07 Thread Craig Taverner
I suggest you code review them first. Especially since there are API changes. On Tue, Jun 7, 2011 at 10:11 AM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Very nice Andreas! You consider it safe to pull these changes into the main repo? Cheers, /peter neubauer GTalk:

Re: [Neo4j] neo4j spatial bounding box vs. lat/lon

2011-06-08 Thread Craig Taverner
this with REST? Thanks! On Tue, Jun 7, 2011 at 11:34 AM, Craig Taverner cr...@amanzi.com wrote: Hi, The bounding boxes are used by the RTree index, which is a typical way to index spatial data. For Point data, the lat/long and the bounding box are the same thing

Re: [Neo4j] neo4j-spatial

2011-06-09 Thread Craig Taverner
Hi Saikat, Yes, your explanation was clear, but I was busy with other work and failed to repond - my bad ;-) Anyway, your idea is nice. And I can think of a few ways to model this in the graph, but at the end of the day the most important thing to decide first is what queries are you going to

Re: [Neo4j] Traversals versus Indexing

2011-06-13 Thread Craig Taverner
Think of your domain model graph as a kind of index. Traversing that should generally be faster than a generic index like lucene. Of course some things do not graph well, and you should use lucene for those. But if you can find something with a graph traversal, that is likely the way to go. Also

Re: [Neo4j] Auto Indexing for Neo4j

2011-06-14 Thread Craig Taverner
This is great news. Now I'm really curious about the next step, and that is allowing indexes other than lucene. For example, the RTree index in neo4j-spatial was never possible to wrap behind the normal index API, because that was designed only for properties of nodes (and relationships), but the

Re: [Neo4j] Slow Traversals on Nodes with too many Relationships

2011-06-15 Thread Craig Taverner
Could this also be related to the possibility that in order to determine relationship type and direction, the relationships need to be loaded from disk? If so, then having a large number of relationships on the same node would decrease performance, if the number was large enough to affect the disk

Re: [Neo4j] Most Efficient way to query in my use cases

2011-06-15 Thread Craig Taverner
Another common thing to do in this case is create a node for the purchase action. This node would be related to the purchaser (user), item (pen) and shop, and would contain data appropriate to the purchase (date/time, price, etc). Then traverse from the shop or the pen to all purchase actions

Re: [Neo4j] Slow Traversals on Nodes with too many Relationships

2011-06-15 Thread Craig Taverner
I understood that on windows the memory mapped sizes needed to be included in the heap, since they are not allocated outside the heap as they are on linux/mac. So in this case he needs a larger heap (and make sure the memory mapped files are much smaller than the heap). The relevant part of the

Re: [Neo4j] Auto Indexing for Neo4j

2011-06-18 Thread Craig Taverner
performance graph database. http://startupbootcamp.org/- Ă–resund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Tue, Jun 14, 2011 at 5:49 PM, Craig Taverner cr...@amanzi.com wrote: This is great news. Now I'm really curious about

Re: [Neo4j] More spatial questions

2011-06-19 Thread Craig Taverner
Hi Nolan, I think I can answer a few of your questions. Firstly, some background. The graph model of the OSM data is based largely on the XML formated OSM documents, and there you will find 'nodes', 'ways', 'relations' and 'tags' each as their own xml-tag, and as a consequence each will also have

Re: [Neo4j] neo4j-spatial roadmap/stability

2011-06-23 Thread Craig Taverner
Hi Christopher, Thanks for your interest in neo4j and neo4j-spatial. I will answer your questions and comments inline. I am working for the largest German speaking travel and holiday portal. Currently we are using a relatively simple MySQL based spatial distance functionality. We plan to

Re: [Neo4j] Neo4j -- Can it be embedded in Android?

2011-06-24 Thread Craig Taverner
I heard that Peter Neubauer made a port of neo4j to android a few years ago, but that nothing has been done since and no version since then would work. So my understanding is that it does not work on android, but that it is possible to make it work (with some work ;-). Peter is away, but I expect

Re: [Neo4j] Neo4j -- Can it be embedded in Android?

2011-06-24 Thread Craig Taverner
that Android exposes. -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Craig Taverner Sent: Friday, June 24, 2011 8:37 AM To: Neo4j user discussions Subject: Re: [Neo4j] Neo4j -- Can it be embedded in Android? I heard

[Neo4j] Recent slowdown in imports with lucene

2011-06-25 Thread Craig Taverner
Hi, Has anyone noticed a slowdown of imports into neo4j with recent snapshots? Neo4j-spatial importing OSM data (which uses lucene to find matching nodes for ways) is suddenly running much slower than usual on non-batch imports. For most of my medium sized test cases, I normally have surprisingly

Re: [Neo4j] Recent slowdown in imports with lucene

2011-06-26 Thread Craig Taverner
if I can find some culprit for this. But again, a little more information would be useful, as always. 2011/6/26 Craig Taverner cr...@amanzi.com Hi, Has anyone noticed a slowdown of imports into neo4j with recent snapshots? Neo4j-spatial importing OSM data (which uses lucene to find

Re: [Neo4j] Recent slowdown in imports with lucene

2011-06-26 Thread Craig Taverner
back to 5000 increased the node creation rate to nearly 1 (over 100 times faster). That is a serious improvement. Sorry again for wasting space on the list. I'm glad this was a user error, though, not a neo4j issue :-) Regards, Craig On Mon, Jun 27, 2011 at 12:54 AM, Craig Taverner cr

Re: [Neo4j] cassandra + neo4j graph

2011-06-27 Thread Craig Taverner
Hi, I can comment on the spatial side. The neo4j-spatialhttps://github.com/neo4j/neo4j-spatiallibrary provides some tools for doing spatial analysis on your data. I do not know exactly what you plan to do, but since you mention user and place locations, I guess you are likely to be asking the

Re: [Neo4j] neo4j-graph-collections

2011-06-28 Thread Craig Taverner
The RTree in principle should be generalizable, but the current implementation in neo4j-spatial does make a few assumptions specific to spatial data, and makes use of spatial envelopes for the tree node bounding boxes. It is also specific to 2D. We could make a few improvements first, like

Re: [Neo4j] neo4j-graph-collections

2011-06-29 Thread Craig Taverner
I have previously used two solutions to deal with multiple types in btrees: - My first index in 2009 was a btree-like n-dim index using generics to support int[], long[], float[] and double[] (no strings). I used this for TimeLine (long[1]) and Location (double[2]). The knowledge about

Re: [Neo4j] neo4j-graph-collections

2011-06-29 Thread Craig Taverner
It is technically possible, but it is a somewhat specialized index, not a normal BTree, so I think you would want both (mine and a classic btree). My index performs better for certain data patterns, is best with semi-ordered data and moderately even distributions (since it has no rebalancing), and

Re: [Neo4j] neo4j-graph-collections

2011-06-29 Thread Craig Taverner
I think moving the RTree to the generic collections would not be too hard. I saw Saikat showed interested in doing this himself. Saikat, contact me off-list for further details on what I think could be done to make this port. On Wed, Jun 29, 2011 at 9:52 PM, Niels Hoogeveen

Re: [Neo4j] traversing densely populated nodes

2011-06-30 Thread Craig Taverner
This topics has come up before, and the domain level solutions are usually very similar, like Norbert's category/proxy nodes (to group by type/direction) and Niels' TimeLineIndex (BTree). I wonder whether we can build a generic user-level solution that can also be wrapped to appear as an internal

Re: [Neo4j] Database engine using Neo4j

2011-06-30 Thread Craig Taverner
Hi Kriti, I can comment on a few things, especially neo4j-spatial: - Neo4j is certainly good for social networks, and people have used it for that, but I personally do not have experience with that so I will not comment further (others can chip in where necessary). - Neo4j-Spatial is

Re: [Neo4j] traversing densely populated nodes

2011-06-30 Thread Craig Taverner
In the amanzi-index I link all indexed nodes into the index tree, so traversals are straight up the tree. Of course this also means that there are at least as many relationships as indexed nodes. I was reviewing Michaels code for the relationship expander, and think that is a great idea,

Re: [Neo4j] GSoC 2011 Neo4j Geoprocessing | Weekly Report #6

2011-07-02 Thread Craig Taverner
Hi Andreas, Sounds like good progress over all. It is only a week to the mid-terms, so it would be good to do a general code overview and see if this can be integrated with trunk. Shall we plan for a review and test integration in the middle of next week? Regards, Craig On Sat, Jul 2, 2011 at

Re: [Neo4j] reify links with other neo4j databases located on different distributed servers

2011-07-02 Thread Craig Taverner
As far as I know there is no internal support for transparent traversals across shards. Generally people are doing that in the application layer. However, I think there might be a middle ground of sorts. I we modify the relationship expander, I could imagine that relationships that are between

Re: [Neo4j] wkb value in node created by addGeometryWKTToLayer

2011-07-02 Thread Craig Taverner
Hi Boris, You do not need to read the property yourself from the node, rather use the GeometryEncoder for this, it converts from the internal spatial storage to the Geometry class, which you can work with. If you call geom.toString() you will get a nice printable version (in WKT). Using the

Re: [Neo4j] neo4j spatial bounding box vs. lat/lon

2011-07-02 Thread Craig Taverner
! On Wed, Jun 8, 2011 at 4:58 PM, Craig Taverner cr...@amanzi.com wrote: OK. I understand much better what you want now. Your person nodes are not geographic objects, they are persons that can be at many positions and indeed move around. However, the 'path' that they take is a geographic

Re: [Neo4j] neo4j spatial bounding box vs. lat/lon

2011-07-02 Thread Craig Taverner
, Craig Taverner cr...@amanzi.com wrote: Hi Boris, Ah! You are using the REST API. That changes a lot, since Neo4j Spatial is only recently exposed in REST and we do not expose most of the capabilities I have discussed in this thread, or indeed in my other answer today. I did

[Neo4j] Cypher error in neo4j-spatial

2011-07-02 Thread Craig Taverner
Hi, Recent builds of Neo4j-Spatial no longer like Peters new bounding box query. Peter is on vacation, and I am not familiar with the code (nor cypher), so I thought I would just dump the error message here for now in case someone can give me a quick pointer. The line of code is: Query query =

Re: [Neo4j] neo4j spatial bounding box vs. lat/lon

2011-07-06 Thread Craig Taverner
can't find the code on github. Thanks! On Sat, Jul 2, 2011 at 6:00 PM, Craig Taverner cr...@amanzi.com wrote: As I understand it, Andreas is working on the much more complex problem of updating OSM geometries. That is more complex because it involves restructuring the connected graph

Re: [Neo4j] Neo4j Spatial - Keep OSM imports

2011-07-08 Thread Craig Taverner
Another option is to run the main method of OSMImport class, which expects command line arguments for database location and OSM file, and will simply import a file once. This is not tested often, so there is a risk things have changed, but it is worth a try. Another, even easier, option in my

Re: [Neo4j] Neo4j Spatial - Keep OSM imports - Use in GeoServer

2011-07-12 Thread Craig Taverner
isn't with the DB. Thanks, Robin Cura 2011/7/9 Craig Taverner cr...@amanzi.com Another option is to run the main method of OSMImport class, which expects command line arguments for database location and OSM file, and will simply import a file once. This is not tested often, so there is a risk

Re: [Neo4j] How to create a graph database out of a huge dataset?

2011-07-19 Thread Craig Taverner
I'm not sure it's such a good idea to call tx.success() on every iteration of the loop. I suggest call it only in the commit, and after the loop (ie. move it two lines down). Also I think a commit size of 50k it a little large. You're probably not going to see much improvement past 10k. In fact I

Re: [Neo4j] How often are Spatial snapshots published?

2011-07-22 Thread Craig Taverner
Interesting that if you look at the github 'blame' for that file (see https://github.com/neo4j/neo4j-spatial/blame/master/src/main/java/org/neo4j/gis/spatial/SpatialTopologyUtils.java), you find that all the findClosestEdges methods where added in October 2010. So if Nolan has a version older than

Re: [Neo4j] Neo4j Spatial and gtype property

2011-07-27 Thread Craig Taverner
Actually we do allow multiple geometry types in the same layer, but some actions, like export to shapely, will fail. We even test for this in TestDynamicLayers. You can use the gtype if you want, but it is specific to some GeometryEncoders, and might change in future releases. It would be better

Re: [Neo4j] Neo4j Spatial and gtype property

2011-07-29 Thread Craig Taverner
at 10:50 PM, Craig Taverner cr...@amanzi.com wrote: Actually we do allow multiple geometry types in the same layer, but some actions, like export to shapely, will fail. We even test for this in TestDynamicLayers. You can use the gtype if you want, but it is specific to some

Re: [Neo4j] neo4j spatial and postgis

2011-08-13 Thread Craig Taverner
Or if you want a command line import, try the ruby gem 'neo4j-spatial.rb'. Once installed you can type: osm_import file.shp On Aug 13, 2011 10:33 AM, Andreas Wilhelm a...@kabelbw.de wrote: Hi, with the pgsql2shp tool you can dump your postgis db in a shapefile and you should be able to import

Re: [Neo4j] Spatial query with property filter

2011-08-29 Thread Craig Taverner
I can elaborate a little on what Peter says. The DynamicLayer support is indeed the only way to do what you want right now, but I think it is actually quite a good fit for your use case. When defining a dynamic layer you are actually just defining a 'returnable evaluator', which will be applied to

Re: [Neo4j] Neo4j low-level data storage

2011-10-07 Thread Craig Taverner
I think Daniels questions are very relevant, but not just to OSM. Any large graph (of which OSM is simply a good example) will be affected by fragmentation, and that can affect performance. I recently was hit by performance of GIS queries (not OSM) related to fragmentation of the index tree. I

Re: [Neo4j] Neo4j in GIS Applications

2011-10-07 Thread Craig Taverner
Hi all, I am certainly behind on my emails, but I did just answer a related question about OSM and fragmentation, and I think that might have answered some of Daniels questions. But I can say a little more about OSM and Neo4j here, specifically about the issue of joins in postgres. Let me start

Re: [Neo4j] Problem Installing Spatial (Beginner)

2011-10-07 Thread Craig Taverner
Sorry for such a late response, I missed this mail. I must first point out that it seems you are trying to use Neo4j-Spatial in the standalone server version of Neo4j. That is possible, but not well supported. We have only exposed a few of the functions in the server, and do not test it

Re: [Neo4j] osm_import.rb

2011-11-11 Thread Craig Taverner
Hi, Sorry for a late contribution to this discussion. I will try make a few comments to cover the various mails above. Firstly, the neo4j-spatial.rb GEM at version 0.0.8 on RubyGems works with Neo4j-Spatial 0.6, which does include the non-batch inserter code, so in principle should work for you.

Re: [Neo4j] OSMImporter: Is there a way to do incremental imports?

2011-11-22 Thread Craig Taverner
I did some initial work on incremental imports back in 2010, but stopped due to some complications: - We needed to mix lucene reads and writes during the import (read to check if the node already exists, so we don't import twice) and this performs very badly in the batch inserter. We

Re: [Neo4j] possibility to merge some neo4j databases?

2011-11-29 Thread Craig Taverner
There are two approaches I can think of: - use a better index for mapping ids. Lucent is too slow. Memory hashtables are memory bound.Peter has been investigating alternative dbs like bdb. I tried, but did not finish a hashmap of cached arrays, and Chris wrote his big data import project on

Re: [Neo4j] Contributors section in the manual

2011-11-29 Thread Craig Taverner
What is the sort order? Date of first commit, number of lines, commits, packages? On Nov 21, 2011 2:35 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Everyone, have started to put in some random people in, see http://docs.neo4j.org/chunked/snapshot/contributors.html . Any ideas

Re: [Neo4j] OSMImporter: Is there a way to do incremental imports?

2011-12-06 Thread Craig Taverner
There was only a method ending in 'WithCheck', or something like that, lying unused in the code from last year. Nothing more than that. Except for thinking about it, which is why I wrote the previous mail. On Dec 2, 2011 12:50 PM, Peter Neubauer pe...@neubauer.se wrote: Not sure, Craig, do you

Re: [Neo4j] Are graphs ok for lots of Event data

2011-12-07 Thread Craig Taverner
Of course the graph can be used for processing event data, and whether that works for your case or not depends. But we have used it for this, and I can discuss a few points. The event stream is obviously just a linear chain and can be modeled as such in the graph (eg. with NEXT relationships

Re: [Neo4j] path finding using OSM ways

2011-12-07 Thread Craig Taverner
We do indeed have twice the node count (and twice the relationship count). This is a necessary side effect of the fact that an OSM node can participate in more than one way (at intersections as well as shared edges of polygons, etc.). In addition, with shared edges the direction can be reversed

Re: [Neo4j] Feedback requested: Major wish list item for Neo4J

2011-12-07 Thread Craig Taverner
I definitely second this suggestion. We have recently being working on a binary store for dense data we would like to access as if they were properties of nodes. Right now we have properties that are references to files on disk, and then handle the binary ourselves, but this does not benefit from

<    1   2   3