@Test public void testNullGeometry() throws Exception { SimpleFeatureCollection fc = getFeaturesFromProperties(NULLGEOM); ShapefileDumper dumper = new ShapefileDumper(dumperFolder); dumper.dump(fc); SimpleFeatureCollection actual = getFeaturesFromShapefile(NULLGEOM); assertEquals(2, actual.size()); checkTypeStructure(actual.getSchema(), MultiPolygon.class, "FID", "NAME"); assertCst(NULLGEOM, "ISO-8859-1"); List<SimpleFeature> features = getFeaturesSortedById(fc); assertThat(features.get(0).getAttribute("FID"), notNullValue()); assertThat(features.get(0).getAttribute("FID"), is("117")); assertThat(features.get(0).getAttribute("NAME"), is("Ashton")); assertThat(features.get(0).getAttribute("the_geom"), notNullValue()); assertThat(features.get(1).getAttribute("FID"), notNullValue()); assertThat(features.get(1).getAttribute("FID"), is("118")); assertThat(features.get(1).getAttribute("NAME"), is("Goose Island")); assertThat(features.get(1).getAttribute("the_geom"), nullValue()); }
public boolean dump(SimpleFeatureCollection fc) throws IOException { return dump(null, fc); }
ShapefileDumper { public boolean dump(SimpleFeatureCollection fc) throws IOException { return dump(null, fc); } }
ShapefileDumper { public boolean dump(SimpleFeatureCollection fc) throws IOException { return dump(null, fc); } ShapefileDumper(File targetDirectory); }
ShapefileDumper { public boolean dump(SimpleFeatureCollection fc) throws IOException { return dump(null, fc); } ShapefileDumper(File targetDirectory); long getMaxShpSize(); void setMaxShpSize(long maxShapeSize); long getMaxDbfSize(); void setMaxDbfSize(long maxDbfSize); Charset getCharset(); void setCharset(Charset charset); boolean isEmptyShapefileAllowed(); void setEmptyShapefileAllowed(boolean emptyShapefileAllowed); boolean dump(SimpleFeatureCollection fc); boolean dump(String fileName, SimpleFeatureCollection fc); }
ShapefileDumper { public boolean dump(SimpleFeatureCollection fc) throws IOException { return dump(null, fc); } ShapefileDumper(File targetDirectory); long getMaxShpSize(); void setMaxShpSize(long maxShapeSize); long getMaxDbfSize(); void setMaxDbfSize(long maxDbfSize); Charset getCharset(); void setCharset(Charset charset); boolean isEmptyShapefileAllowed(); void setEmptyShapefileAllowed(boolean emptyShapefileAllowed); boolean dump(SimpleFeatureCollection fc); boolean dump(String fileName, SimpleFeatureCollection fc);  }