Examples of GeoPipeFlow


Examples of org.neo4j.gis.spatial.pipes.GeoPipeFlow

 
  @Override
  protected void extract(GeoPipeFlow pipeFlow) {
    int numPoints = pipeFlow.getGeometry().getCoordinates().length;
    for (int i = 0; i < numPoints; i++) {
      GeoPipeFlow newPoint = pipeFlow.makeClone("point" + i);
      newPoint.setGeometry(geomFactory.createPoint(pipeFlow.getGeometry().getCoordinates()[i]));
      extracts.add(newPoint);
    }
  }
View Full Code Here

Examples of org.neo4j.gis.spatial.pipes.GeoPipeFlow

  @Override 
  protected void group(GeoPipeFlow flow) {
    if (groups.size() == 0) {
      groups.add(flow);
    } else {
      GeoPipeFlow result = groups.get(0);
      result.setGeometry(result.getGeometry().union(flow.getGeometry()));
      result.merge(flow);
    }
  }
View Full Code Here

Examples of org.neo4j.gis.spatial.pipes.GeoPipeFlow

    if (pipeFlow.getGeometry().getNumGeometries() == 1) {
      extracts.add(pipeFlow);
    } else {
      int numGeom = pipeFlow.getGeometry().getNumGeometries();
      for (int i = 0; i < numGeom; i++) {
        GeoPipeFlow newGeom = pipeFlow.makeClone("geometry" + i);
        newGeom.setGeometry(pipeFlow.getGeometry().getGeometryN(i));
        extracts.add(newGeom);
      }
    }
  }
View Full Code Here

Examples of org.neo4j.gis.spatial.pipes.GeoPipeFlow

  @Override 
  protected void group(GeoPipeFlow flow) {
    if (groups.size() == 0) {
      groups.add(flow);
    } else {
      GeoPipeFlow result = groups.get(0);
      result.setGeometry(result.getGeometry().intersection(flow.getGeometry()));
      result.merge(flow);
    }
  }
View Full Code Here

Examples of org.neo4j.gis.spatial.pipes.GeoPipeFlow

    for (Path path : createTraverserInBackwardsCompatibleWay( td, node )) {
      Node pointNode = path.endNode();
      double longitude = (Double) pointNode.getProperty("lon");
      double latitude = (Double) pointNode.getProperty("lat");
     
      GeoPipeFlow newPoint = pipeFlow.makeClone("osmpoint" + counter++);
      newPoint.setGeometry(geomFactory.createPoint(new Coordinate(longitude, latitude)));
      extracts.add(newPoint);     
    }
  }
View Full Code Here

Examples of org.neo4j.gis.spatial.pipes.GeoPipeFlow

    assertEquals(coords.length, layerB.getIndex().count());
  }

  private void checkPointOrder(List<GeoPipeFlow> results) {
    for (int i = 0; i < results.size() - 1; i++) {
      GeoPipeFlow first = results.get(i);
      GeoPipeFlow second = results.get(i + 1);
      double d1 = (Double) first.getProperties().get("OrthodromicDistance");
      double d2 = (Double) second.getProperties().get("OrthodromicDistance");
      assertTrue("Point at position " + i + " (d=" + d1 + ") must be closer than point at position " + (i + 1) + " (d=" + d2
          + ")", d1 <= d2);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.