@Test public void testGeoShapePointString() throws JsonParseException, JsonMappingException, IOException { Point geom = rgb.createRandomPoint(); final Map<String, Object> map = new HashMap<>(); final List<String> coords = new ArrayList<>(); coords.add(String.valueOf(geom.getX())); coords.add(String.valueOf(geom.getY())); map.put("coordinates", coords); map.put("type", "Point"); assertTrue(parserUtil.createGeometry(map).equalsExact(geom, 1e-9)); }
@Test public void testGeoShapePoint() throws JsonParseException, JsonMappingException, IOException { Point geom = rgb.createRandomPoint(); assertTrue(parserUtil.createGeometry(rgb.toMap(geom)).equalsExact(geom, 1e-9)); }