Package org.neo4j.gis.spatial

Examples of org.neo4j.gis.spatial.SimplePointLayer


  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");
View Full Code Here

TOP

Related Classes of org.neo4j.gis.spatial.SimplePointLayer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.