use of org.locationtech.spatial4j.shape.ShapeCollection in project elasticsearch by elastic.
the class GeoJSONShapeParserTests method testParseMultiPoint.
public void testParseMultiPoint() throws IOException {
XContentBuilder multiPointGeoJson = XContentFactory.jsonBuilder().startObject().field("type", "MultiPoint").startArray("coordinates").startArray().value(100.0).value(0.0).endArray().startArray().value(101.0).value(1.0).endArray().endArray().endObject();
ShapeCollection expected = shapeCollection(SPATIAL_CONTEXT.makePoint(100, 0), SPATIAL_CONTEXT.makePoint(101, 1.0));
assertGeometryEquals(expected, multiPointGeoJson);
}
Aggregations