use of org.gdal.ogr.Driver in project com.revolsys.open by revolsys.
the class OgrRecordStore method newDataSource.
protected DataSource newDataSource(final boolean update) {
final String path = FileUtil.getCanonicalPath(this.file);
DataSource dataSource;
if (this.file.exists()) {
dataSource = ogr.Open(path, update);
} else {
final Driver driver = ogr.GetDriverByName(this.driverName);
dataSource = driver.CreateDataSource(path);
}
return dataSource;
}
Aggregations