Package org.neo4j.gis.spatial.filter

Examples of org.neo4j.gis.spatial.filter.SearchIntersect


 
  protected void addEdgePoint(Node edge, Geometry edgePoint) {
    if (buffer != null) edgePoint = edgePoint.buffer(buffer.doubleValue());
   
    Iterator<SpatialDatabaseRecord> results = pointsLayer.getIndex().search(
        new SearchIntersect(pointsLayer, edgePoint));
    if (!results.hasNext()) {
      SpatialDatabaseRecord point = pointsLayer.add(edgePoint);
      edge.createRelationshipTo(point.getGeomNode(), SpatialRelationshipTypes.NETWORK);
    } else {
      while (results.hasNext()) {
View Full Code Here


     * @return list of point results containing the matched point on the geometry, the spatial record and the distance each
     */
  public static List<PointResult> findClosestEdges(Point point, Layer layer, Geometry filter) {
    ArrayList<PointResult> results = new ArrayList<PointResult>();
   
    Iterator<SpatialDatabaseRecord> records = layer.getIndex().search(new SearchIntersect(layer, filter));
    while (records.hasNext()) {
      SpatialDatabaseRecord record = records.next();
      Geometry geom = record.getGeometry();
      if (geom instanceof LineString) {
        LocationIndexedLine line = new LocationIndexedLine(geom);
View Full Code Here

            }

            for (LayerIndexReader index : new LayerIndexReader[] { rtreeIndex, fakeIndex }) {
                ArrayList<TestGeometry> foundData = new ArrayList<TestGeometry>();

                SearchIntersect searchQuery = new SearchIntersect(layer, layer.getGeometryFactory().toGeometry(Utilities.fromNeo4jToJts(bbox)));
                SearchRecords results = index.search(searchQuery);

                int count = 0;
                int ri = 0;
                for (SpatialDatabaseRecord r : results) {
View Full Code Here

TOP

Related Classes of org.neo4j.gis.spatial.filter.SearchIntersect

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.