Hi all, while trying to come up with a good approach to GeoProcessing in Neo4j Spatial as we wrap up Andreas Wilhelms work from the GSoC, we are experimenting with a dataflow-based lazy approach (using the generic parts of Tinkerpop pipes). This is broken up into filtering operations (that filter out and search geometries) and processing operations (that manipulate, change and create new geometries).
The first result after a day labbing looks like https://github.com/neo4j/spatial/blob/master/src/test/java/org/neo4j/gis/spatial/pipes/GeoPipesTest.java, so basically we have something like @Test public void count_all_geometries_in_a_layer() { assertEquals( 2, layer.filter().all().count() ); } @Test public void count_number_of_points_in_all_geometries_in_a_layer() { assertEquals( 24, layer.filter().all().process().countPoints() ); } What do you think of this approach to provide a simple way to achieve more complex operations? With the spatial index soon implementing lazy BBox searches, we should be able to make this work in the filtering part. Maybe there should be one more part, search() or index(), dropping back to the starting points that already exist and that not really are taking any input beside the search parameters? In the geoprocessing part, we are currently looking into overriding pipe implementations so that a simple default toPoints() will convert geometries to Points using JTS, while a more specialized domain-level toPoints() (will do that in the OSM model) can actually walk the graph to find out the points that make up a geometry. WDYT? 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. _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

