private void loadSamplePointData() {
Transaction tx = graphDb().beginTx();
try {
SpatialDatabaseService spatial = new SpatialDatabaseService(graphDb());
SimplePointLayer layer = spatial.createSimplePointLayer("GeoPipesPerformanceTest");
System.out.println("Creating database of " + records + " point records");
for (int i = 0; i < records; i++) {
double x = 10.0 + Math.random() * 10.0;
double y = 10.0 + Math.random() * 10.0;
String name = "Fake Geometry " + i;
// System.out.println("Creating point '" + name +
// "' at location x:" + x + " y:" + y);
SpatialDatabaseRecord record = layer.add(x, y);
record.getGeomNode().setProperty("name", name);
}
tx.success();
tx.close();
System.out.println("Finished writing " + records + " point records to database");