importGeoJson method

Future<GeoImportProgress> importGeoJson({
  1. required String filePath,
  2. required String table,
  3. String geometryColumn = 'geometry',
  4. int batchSize = 1000,
  5. bool skipInvalid = false,
  6. GeoParseOptions options = const GeoParseOptions(),
  7. void onProgress(
    1. 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,
  );
}