@@ -0,0 +1,1791 @@
+package _1_vector._3_solutions;%0A%0Aimport com.vividsolutions.jts.geom.Polygon;%0Aimport org.geotools.data.FileDataStore;%0Aimport org.geotools.data.shapefile.ShapefileDataStoreFactory;%0Aimport org.geotools.feature.simple.SimpleFeatureTypeBuilder;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.opengis.feature.simple.SimpleFeatureType;%0A%0Aimport java.nio.file.DirectoryStream;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Path;%0Aimport java.nio.file.Paths;%0A%0Aimport static org.junit.Assert.assertFalse;%0Aimport static org.junit.Assert.assertTrue;%0A%0A/**%0A * @author Jesse on 3/24/2015.%0A */%0Apublic class _4_DataStoreCreateSchema %7B%0A%0A    @Before%0A    public void setup() throws Exception %7B%0A        final Path pwd = Paths.get(%22.%22);%0A        try (DirectoryStream%3CPath%3E paths = Files.newDirectoryStream(pwd, %22newFrance.*%22)) %7B%0A            for (Path path : paths) %7B%0A                Files.delete(path);%0A            %7D%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void test() throws Exception %7B%0A        final SimpleFeatureTypeBuilder ftBuilder = new SimpleFeatureTypeBuilder();%0A        ftBuilder.setName(%22NewFT%22);%0A        ftBuilder.add(%22the_geom%22, Polygon.class, %22EPSG:4326%22);%0A        ftBuilder.add(%22population%22, Integer.class);%0A        final SimpleFeatureType featureType = ftBuilder.buildFeatureType();%0A%0A        final ShapefileDataStoreFactory dataStoreFactory = new ShapefileDataStoreFactory();%0A%0A        final Path datastoreFile = Paths.get(%22newFrance.shp%22);%0A        final FileDataStore dataStore = dataStoreFactory.createDataStore(datastoreFile.toUri().toURL());%0A        try %7B%0A            assertFalse(Files.exists(datastoreFile));%0A%0A            dataStore.createSchema(featureType);%0A%0A            assertTrue(Files.exists(datastoreFile));%0A        %7D finally %7B%0A            dataStore.dispose();%0A        %7D%0A    %7D%0A%7D%0A

create Schema example added