Package org.neo4j.gis.spatial.filter

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


     * @param layer
     * @param searchWindow
     * @return geoPipeline
     */
    public static GeoPipeline startIntersectWindowSearch(Layer layer, Envelope searchWindow) {
      return start(layer, layer.getIndex().search(new SearchIntersectWindow(layer, searchWindow)));
    }
View Full Code Here


   * @param point
   * @param searchWindow
   * @return geoPipeline
   */
  public static GeoPipeline startNearestNeighborLatLonSearch(Layer layer, Coordinate point, Envelope searchWindow) {
    return start(layer, new SearchIntersectWindow(layer, searchWindow))
      .calculateOrthodromicDistance(point);
  }
View Full Code Here

   * @param maxDistanceInKm
   * @return geoPipeline
   */
  public static GeoPipeline startNearestNeighborLatLonSearch(Layer layer, Coordinate point, double maxDistanceInKm) {
    Envelope searchWindow = OrthodromicDistance.suggestSearchWindow(point, maxDistanceInKm);
    GeoPipeline pipeline = start(layer, new SearchIntersectWindow(layer, searchWindow))
      .calculateOrthodromicDistance(point);
   
    if (layer.getGeometryType() != null && layer.getGeometryType() == Constants.GTYPE_POINT) {
      pipeline = pipeline.propertyFilter("OrthodromicDistance", maxDistanceInKm, FilterPipe.Filter.LESS_THAN_EQUAL);
    }
View Full Code Here

   * @param point
   * @param searchWindow
   * @return geoPipeline
   */
  public static GeoPipeline startNearestNeighborSearch(Layer layer, Coordinate point, Envelope searchWindow) {
    return start(layer, new SearchIntersectWindow(layer, searchWindow))
      .calculateDistance(layer.getGeometryFactory().createPoint(point));
  }
View Full Code Here

   */
  public static GeoPipeline startNearestNeighborSearch(Layer layer, Coordinate point, double maxDistance) {
    Envelope extent = new Envelope(point.x - maxDistance, point.x + maxDistance,
        point.y - maxDistance, point.y + maxDistance);
   
    return start(layer, new SearchIntersectWindow(layer, extent))
      .calculateDistance(layer.getGeometryFactory().createPoint(point))
      .propertyFilter("Distance", maxDistance, FilterPipe.Filter.LESS_THAN_EQUAL);
  }
View Full Code Here

    public void union() throws Exception
    {
      // START SNIPPET: s_union
      WKTReader reader = new WKTReader( intersectionLayer.getGeometryFactory() );
        Geometry geometry = reader.read( "POLYGON ((3 3, 3 5, 7 7, 7 3, 3 3))" );
        SearchFilter filter = new SearchIntersectWindow( intersectionLayer, new Envelope( 7, 10, 7, 10 ) );
        GeoPipeline pipeline = GeoPipeline.start( intersectionLayer, filter ).union( geometry );
        // END SNIPPET: s_union
        addImageSnippet( intersectionLayer, pipeline, getTitle() );

        // TODO test?
View Full Code Here

TOP

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

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.