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

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


    wayNodes.add(new WayNode(1l));
    wayNodes.add(new WayNode(2l));
    when(way.getWayNodes()).thenReturn(wayNodes);

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

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


    wayNodes.add(new WayNode(1l));
    wayNodes.add(new WayNode(2l));
    when(way.getWayNodes()).thenReturn(wayNodes);

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

    // Action
    ESWay.Builder.buildFromEntity(way, builder.build());
  }
View Full Code Here

      if (!response.isExists()) continue;
      @SuppressWarnings("unchecked")
      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) {
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.