コード例 #1
0
 @Test
 public void testGeoShapeGeometryCollection()
     throws JsonParseException, JsonMappingException, IOException {
   rgb.setNumGeometries(5);
   GeometryCollection geom = rgb.createRandomGeometryCollection();
   assertTrue(parserUtil.createGeometry(rgb.toMap(geom)).equalsExact(geom, 1e-9));
 }
コード例 #2
0
 @Test
 public void testGeoShapeEnvelope() throws JsonParseException, JsonMappingException, IOException {
   Envelope envelope = rgb.createRandomEnvelope();
   Geometry expected = geometryFactory.toGeometry(envelope);
   assertTrue(parserUtil.createGeometry(rgb.toMap(envelope)).equalsExact(expected, 1e-9));
 }
コード例 #3
0
 @Test
 public void testGeoShapeMultiPolygon()
     throws JsonParseException, JsonMappingException, IOException {
   MultiPolygon geom = rgb.createRandomMultiPolygon();
   assertTrue(parserUtil.createGeometry(rgb.toMap(geom)).equalsExact(geom, 1e-9));
 }
コード例 #4
0
 @Test
 public void testGeoShapeLineString()
     throws JsonParseException, JsonMappingException, IOException {
   LineString geom = rgb.createRandomLineString();
   assertTrue(parserUtil.createGeometry(rgb.toMap(geom)).equalsExact(geom, 1e-9));
 }