public static boolean importShapefile ( ASpatialDb db , File shapeFile , String tableName , int limit , IHMProgressMonitor pm ) throws Exception { FileDataStore store = FileDataStoreFinder . getDataStore ( shapeFile ) ; SimpleFeatureSource featureSource = store . getFeatureSource ( ) ; SimpleFeatureCollection features = featureSource . getFeatures ( ) ; return importFeatureCollection ( db , features , tableName , limit , pm ) ; }
Import a shapefile into a table .