List of usage examples for org.springframework.data.mongodb.core.geo GeoJsonLineString GeoJsonLineString
public GeoJsonLineString(List<Point> points)
From source file:org.springframework.data.mongodb.core.geo.GeoJsonModuleUnitTests.java
/** * @see DATAMONGO-1181/*from w w w . j a va 2 s .c o m*/ */ @Test public void shouldDeserializeGeoJsonLineStringCorrectly() throws JsonParseException, JsonMappingException, IOException { String json = "{ \"type\": \"LineString\", \"coordinates\": [ [10.0, 20.0], [30.0, 40.0], [50.0, 60.0] ]}"; assertThat(mapper.readValue(json, GeoJsonLineString.class), is(new GeoJsonLineString(Arrays.asList(new Point(10, 20), new Point(30, 40), new Point(50, 60))))); }