Search in sources :

Example 1 with Driver

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;
}
Also used : Driver(org.gdal.ogr.Driver) DataSource(org.gdal.ogr.DataSource)

Aggregations

DataSource (org.gdal.ogr.DataSource)1 Driver (org.gdal.ogr.Driver)1