Package org.elasticsearch.common.geo.builders

Examples of org.elasticsearch.common.geo.builders.ShapeBuilder


        .addTag("highway", "residential").addTag("name", "Avenue Marc Sangnier").build();
    indexAdminService.index(INDEX_NAME, ESEntityType.WAY.getIndiceName(), 40849832l, way.toJson());
    refresh();

    // Action
        ShapeBuilder shape = buildSquareShape(48.675763, 2.379358, 10000);
    SearchResponse searchResponse = client().prepareSearch(INDEX_NAME).setTypes(ESEntityType.WAY.getIndiceName())
        .setQuery(QueryBuilders.matchAllQuery())
        .setPostFilter(new GeoShapeFilterBuilder("shape", shape))
        .execute().actionGet();
View Full Code Here


    refresh();

    // Action
    // ~ 45 meters min shape radius to match
    // center between positions index #5 and #6
        ShapeBuilder shape = buildSquareShape(48.675689, 2.38259, 45);
    SearchResponse searchResponse = client().prepareSearch(INDEX_NAME).setTypes(ESEntityType.WAY.getIndiceName())
        .setQuery(QueryBuilders.matchAllQuery())
        .setPostFilter(new GeoShapeFilterBuilder("shape", shape))
        .execute().actionGet();
View Full Code Here

        .addTag("building", "yes").build();
    indexAdminService.index(INDEX_NAME, ESEntityType.WAY.getIndiceName(), 97583115l, way.toJson());
    refresh();

    // Action
    ShapeBuilder shape = buildSquareShape(48.675763, 2.379358, 100);
    SearchResponse searchResponse = client().prepareSearch(INDEX_NAME).setTypes(ESEntityType.WAY.getIndiceName())
        .setQuery(QueryBuilders.matchAllQuery())
        .setPostFilter(new GeoShapeFilterBuilder("shape", shape))
        .execute().actionGet();
View Full Code Here

        .addTag("building", "yes").build();
    indexAdminService.index(INDEX_NAME, ESEntityType.WAY.getIndiceName(), 97583115l, way.toJson());
    refresh();

    // Action
    ShapeBuilder shape = buildSquareShape(48.676455, 2.380899, 20);
    SearchResponse searchResponse = client().prepareSearch(INDEX_NAME).setTypes(ESEntityType.WAY.getIndiceName())
        .setQuery(QueryBuilders.matchAllQuery())
        .setPostFilter(new GeoShapeFilterBuilder("shape", shape))
        .execute().actionGet();
View Full Code Here

        .addTag("highway", "traffic_signals").build();
    index(INDEX_NAME, node);
    refresh();

    // Action
    ShapeBuilder shape = buildSquareShape(48.675652, 2.384955, 20);
    SearchResponse searchResponse = client().prepareSearch(INDEX_NAME).setTypes(ESEntityType.NODE.getIndiceName())
        .setQuery(QueryBuilders.matchAllQuery())
        .setPostFilter(new GeoShapeFilterBuilder("shape", shape))
        .execute().actionGet();
View Full Code Here

        .addTag("highway", "traffic_signals").build();
    index(INDEX_NAME, node);
    refresh();

    // Action
    ShapeBuilder shape = buildSquareShape(48.676455, 2.380899, 20);
    SearchResponse searchResponse = client().prepareSearch(INDEX_NAME).setTypes(ESEntityType.NODE.getIndiceName())
        .setQuery(QueryBuilders.matchAllQuery())
        .setPostFilter(new GeoShapeFilterBuilder("shape", shape))
        .execute().actionGet();
View Full Code Here

        .addTag("highway", "traffic_signals").build();
    index(INDEX_NAME, node);
    refresh();

    // Action
    ShapeBuilder shape = buildSquareShape(48.675652, 2.384955, 10000);
    SearchResponse searchResponse = client().prepareSearch(INDEX_NAME).setTypes(ESEntityType.NODE.getIndiceName())
        .setQuery(QueryBuilders.matchAllQuery())
        .setPostFilter(new GeoShapeFilterBuilder("shape", shape))
        .execute().actionGet();
View Full Code Here

    index(INDEX_NAME, node);
    refresh();

    // Action
    // Can't do better than 20m with default shape configuration
    ShapeBuilder shape = buildSquareShape(48.675652, 2.384955, 20);
    SearchResponse searchResponse = client().prepareSearch(INDEX_NAME).setTypes(ESEntityType.NODE.getIndiceName())
        .setQuery(QueryBuilders.matchAllQuery())
        .setPostFilter(new GeoShapeFilterBuilder("shape", shape))
        .execute().actionGet();
View Full Code Here

        .addTag("highway", "residential").addTag("name", "Avenue Marc Sangnier").build();
    indexAdminService.index(INDEX_NAME, ESEntityType.WAY.getIndiceName(), 40849832l, way.toJson());
    refresh();

    // Action
    ShapeBuilder shape = buildSquareShape(48.675763, 2.379358, 20);
    SearchResponse searchResponse = client().prepareSearch(INDEX_NAME).setTypes(ESEntityType.WAY.getIndiceName())
        .setQuery(QueryBuilders.matchAllQuery())
        .setPostFilter(new GeoShapeFilterBuilder("shape", shape))
        .execute().actionGet();
View Full Code Here

        .addTag("highway", "residential").addTag("name", "Avenue Marc Sangnier").build();
    indexAdminService.index(INDEX_NAME, ESEntityType.WAY.getIndiceName(), 40849832l, way.toJson());
    refresh();

    // Action
        ShapeBuilder shape = buildSquareShape(48.676455, 2.380899, 20);
    SearchResponse searchResponse = client().prepareSearch(INDEX_NAME).setTypes(ESEntityType.WAY.getIndiceName())
        .setQuery(QueryBuilders.matchAllQuery())
        .setPostFilter(new GeoShapeFilterBuilder("shape", shape))
        .execute().actionGet();
View Full Code Here

TOP

Related Classes of org.elasticsearch.common.geo.builders.ShapeBuilder

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.