Package org.openstreetmap.osmosis.plugin.elasticsearch.model.shape.ESShape

Examples of org.openstreetmap.osmosis.plugin.elasticsearch.model.shape.ESShape.ESShapeBuilder.build()


    ESWay expected = ESWay.Builder.create().id(1l)
        .addLocation(1.0, 2.0).addLocation(2.0, 3.0)
        .addTag("highway", "primary").build();

    // Action
    ESWay actual = ESWay.Builder.buildFromEntity(way, builder.build());

    // Assert
    assertEquals(expected, actual);
  }
View Full Code Here


    ESShapeBuilder builder = new ESShapeBuilder();
    builder.addLocation(1.0, 2.0);

    // Action
    ESWay.Builder.buildFromEntity(way, builder.build());
  }

  @Test
  public void buildFromGetReponse() {
    // Setup
View Full Code Here

      Map<String, Object> shape = (Map<String, Object>) response.getField("shape").getValue();
      @SuppressWarnings("unchecked")
      List<Double> coordinates = (List<Double>) shape.get("coordinates");
      shapeBuilder.addLocation(coordinates.get(1), coordinates.get(0));
    }
    return shapeBuilder.build();
  }

  protected void executeBulkRequest(BulkRequestBuilder bulkRequest) {
    if (bulkRequest.numberOfActions() == 0) return;
    BulkResponse bulkResponse = bulkRequest.execute().actionGet();
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.