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 GeometryEncoder is a particularly good idea because we support many internal storage formats, not just the WKB you found. If you have point data only, you should consider using the SimplePointLayer (created with SpatialDatabaseService.createSimplePointLayer()), which will store the Point as two properties, for latitude and longitude.
Back to your main question: WKB and WKT are two different formats for representing spatial data. We support both with the WKBGeometryEncoder and WKTGeometryEncoder classes, but in both cases we convert from that format to JTS Geometry class for performing spatial operations on. Internally these classes use the WKBReader/WKBWriter (and WKT versions of this) for performing the conversions. If you want to convert between WKB and WKT yourself, you should just use the JTS code directly. But as I said before, I do not think you need to do this. If you are getting your nodes from a search using the index, something like search.getResults().get(0).getGeometry().toString() will return the WKT version. Regards, Craig On Sat, Jul 2, 2011 at 1:04 AM, Boris Kizelshteyn <bo...@popcha.com> wrote: > Craig or anyone who can answer this: what does the wkb value represent > here. > I know its the well known bytes, but how do I get back to wkt? I thought it > was a byte array, but I can't seem to get my original values back. Form the > values in the test case I have: > > POINT(15.2 60.1) > > > wkb: > > [0,0,0,0,2,0,0,0,2,64,46,51,51,51,51,51,51,64,78,25,-103,-103,-103,-103,-102,64,46,-103,-103,-103,-103,-103,-102,64,78,12,-52,-52,-52,-52,-51] > _______________________________________________ > 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