Hi Alireza, Which part of the creation is wrong? >
Only that you are adding LineString and Polygon to a layer created with SimplePointEncoder, which will not be able to store anything other than Point correctly. We should actually throw an exception when you do this, but apparently we just store one point of the geometry instead. > Another question is: to answer geometrical query would it be enough to > store only vertices as geometry type > and edges and 2D shapes as normal nodes? > You could store only points in the SimplePoint layer, and model the lines and polygons as edges yourself in your graph (by connecting the points). This is a valid approach. But in his case you cannot perform JTS functions on the LineString and Polygon, because they will know be known as Geometries by the library. You need to do that logic yourself, because the connectedness is only known by your own data model. However, your case is also ideal for creating your own GeometryEncoder, one that understands Point, LineString and Polygon, and understands that the Point objects are parts of the LineString or Polygon objects in the same connected graph. This is what we did for the OpenStreetMap model, which is a fully connected graph. However, it is not trivial. And it has to be coded by you because it is very specific to your data model. Only you know how you have decided to connect things together in the graph. > These objects have their own "id", that is why I set that as a property, I > assume we do not have control over neo4j > property, i.e., we cannot set it right? > It is not wrong to create a property of name 'id', but it is a bit ambiguous. I'd feel safer to use a more specific name like 'my_id', or something meaningful to your domain. -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.