importGeoJson method
Future<GeoImportProgress>
importGeoJson({
- required String filePath,
- required String table,
- String geometryColumn = 'geometry',
- int batchSize = 1000,
- bool skipInvalid = false,
- GeoParseOptions options = const GeoParseOptions(),
- void onProgress(
- GeoImportProgress progress
geometryColumn defaults to geometry. batchSize rows share one
transaction. A cancelled import keeps the batches already committed.
Implementation
Future<GeoImportProgress> importGeoJson({
required String filePath,
required String table,
String geometryColumn = 'geometry',
int batchSize = 1000,
bool skipInvalid = false,
GeoParseOptions options = const GeoParseOptions(),
void Function(GeoImportProgress progress)? onProgress,
}) {
return importGeoJsonStream(
bytes: File(filePath).openRead(),
table: table,
geometryColumn: geometryColumn,
batchSize: batchSize,
skipInvalid: skipInvalid,
options: options,
onProgress: onProgress,
);
}