> > Uh, I would too actually. ;) I thought that all I needed to do was > create the SpatialDatabaseService and start grabbing layers.
Well, you can make empty layers if you want, but in order to see layers in the database you must either import data (creates a layer) or create an empty layer (which you can add geometries to later if you want). > Or by > "load" do you mean import from OSM? If so, then here's what I'm doing: > Yes. The OSM import should create a single layer. class MyBatchInserter extends BatchInserterImpl(database.getStoreDir) { > I'm slightly suspicious that you might be opening the batch inserter on an already open database, which is not allowed. The database should be closed. And yet you said you are seeing import messages, so perhaps there is some scala trick I am missing. def performImport() { > val batchInserter = new MyBatchInserter > importer.importFile(batchInserter, filename) > batchInserter.shutdown() > } > I do not see the code for indexing the layer. The OSMImporter has a two phase import, the first imports the OSM data into an OSM graph structure, which can be traversed as OSM data, but has not been published as a layer of JTS Geometries. You need to run the second phase, which means calling the importer.reindex method with a normal GraphDatabaseService instance. This would certainly explain why you can see the import happing, but then not find the layer. That's extending a few local traits and such, but it does output lots of > log messages indicating that it is importing and does leave me with a > database in the end, so it seems to be working. > I think it is the missing call to import.reindex that is causing your problem. The reason we split the OSM import into two phases was we wanted to use the batch inserter for the heavy duty task of getting the bulk of the data into the database, but we could not use it for the indexing task, because the RTree needs to delete nodes during index tree splits, and the batch inserter does not allow delete. So we have to switch back to the normal GraphDatabaseService for the second phase, which creates the layer and index and adds all geometries to the index. We are currently evaluating alternative performance improvements which will allow us to use the normal API for the entire process, in which case we will remove the second phase and index the geometries as we find them. But right now that is not possible. Regards, Craig _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user