@Test public void testMultipleTypeEmptyGeometries() throws Exception { SimpleFeatureCollection fc = getFeaturesFromProperties(EMPTYGEOMS); ShapefileDumper dumper = new ShapefileDumper(dumperFolder); dumper.dump(fc); SimpleFeatureCollection point = getFeaturesFromShapefile(EMPTYGEOMS + "Point"); assertEquals(1, point.size()); assertNull(DataUtilities.first(point).getDefaultGeometry()); checkTypeStructure(point.getSchema(), Point.class, "name"); assertCst(EMPTYGEOMS + "Point", "ISO-8859-1"); SimpleFeatureCollection mpoint = getFeaturesFromShapefile(EMPTYGEOMS + "MPoint"); assertEquals(1, mpoint.size()); assertNull(DataUtilities.first(mpoint).getDefaultGeometry()); checkTypeStructure(mpoint.getSchema(), MultiPoint.class, "name"); assertCst(EMPTYGEOMS + "MPoint", "ISO-8859-1"); SimpleFeatureCollection polygon = getFeaturesFromShapefile(EMPTYGEOMS + "Polygon"); assertEquals(2, polygon.size()); List<SimpleFeature> polygonFeatures = DataUtilities.list(polygon); assertNull((Geometry) polygonFeatures.get(0).getDefaultGeometry()); assertNull((Geometry) polygonFeatures.get(1).getDefaultGeometry()); checkTypeStructure(polygon.getSchema(), MultiPolygon.class, "name"); assertCst(EMPTYGEOMS + "Polygon", "ISO-8859-1"); SimpleFeatureCollection line = getFeaturesFromShapefile(EMPTYGEOMS + "Line"); assertEquals(2, line.size()); List<SimpleFeature> lineFeatures = DataUtilities.list(polygon); assertNull((Geometry) lineFeatures.get(0).getDefaultGeometry()); assertNull((Geometry) lineFeatures.get(1).getDefaultGeometry()); checkTypeStructure(line.getSchema(), MultiLineString.class, "name"); assertCst(EMPTYGEOMS + "Line", "ISO-8859-1"); }
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);  }