的原因是什麼,以及如何解決此異常:Neo4j的使用空間:NotFoundException:超過一個關係
org.neo4j.graphdb.NotFoundException: More than one relationship[RTREE_CHILD, INCOMING] found for NodeImpl#105
at org.neo4j.kernel.impl.core.NodeImpl.getSingleRelationship(NodeImpl.java:344)
at org.neo4j.kernel.impl.core.NodeProxy.getSingleRelationship(NodeProxy.java:191)
at org.neo4j.collections.rtree.RTreeIndex.getIndexNodeParent(RTreeIndex.java:768)
at org.neo4j.collections.rtree.RTreeIndex.adjustPathBoundingBox(RTreeIndex.java:672)
at org.neo4j.collections.rtree.RTreeIndex.add(RTreeIndex.java:90)
at org.neo4j.gis.spatial.EditableLayerImpl.add(EditableLayerImpl.java:44)
at org.neo4j.gis.spatial.ShapefileImporter.importFile(ShapefileImporter.java:209)
at org.neo4j.gis.spatial.ShapefileImporter.importFile(ShapefileImporter.java:122)
我使用的2.0.0和空間罐子從編譯GitHub的項目來。
,當我嘗試導入shapefile中的異常被拋出(這是在非託管擴展代碼):
GraphDatabaseService spatialDb = new GraphDatabaseFactory().newEmbeddedDatabase("/home/db/data/spatial.db");
Transaction tx = spatialDb.beginTx();
try {
ShapefileImporter importer = new ShapefileImporter(spatialDb, new NullListener());
importer.importFile("/home/bla/realshp/users_location.shp", "users_location");
tx.success();
} catch (Exception e) {
e.printStackTrace();
} finally {
tx.close();
return Response.status(200).entity("Done. ").build();
}
從CSV生成形狀文件,ogr2ogr文件 - 它似乎合法的,沒有例外被讀取。在原始文件有一圈定義如下(ogr2ogr將拉動經度和緯度)30000點:
id,longitude,latitude,gender,updated
3,-122.1171925,37.4343361,1,2013-11-20 05:03:22
304,-122.0919000,37.3094000,1,2013-11-03 00:42:01
311,-122.0919000,37.3094000,1,2013-11-03 00:42:01
怎麼去解決呢?我需要加載數百萬分的數據庫。 側面問題:現在我創建新的圖形空間數據存儲 - 它是否正確?也許我應該把它加載到現有的圖形數據庫?
UPDATE:
我試圖輸入 「手動」 座標使用從TestSimplePointLayer方法。我在第450個座標上得到了同樣的例外。它們的組合與你在樣本中看到的一樣,但是它們是有效的點。如何解決它?
感謝我能導入使用層對象API數據。從來沒有成功的shapefile,壽。 – user3167332