Skip to content
Snippets Groups Projects
Commit 0cf627bb authored by Cédric Traizet's avatar Cédric Traizet
Browse files

ENH: remove GetDriverNameFromDataSource()

parent 5b82e659
No related branches found
No related tags found
No related merge requests found
......@@ -137,9 +137,6 @@ namespace version_proxy
OTBGdalAdapters_EXPORT
GDALDriverType * GetDriverByName(const char * name);
OTBGdalAdapters_EXPORT
std::string GetDriverNameFromDataSource(const GDALDatasetType * ds);
/**
* Return the list of files composing the dataset.
*
......
......@@ -201,15 +201,6 @@ std::vector<std::string> GetAvailableDriversAsStringVector()
return ret;
}
std::string GetDriverNameFromDataSource(const GDALDatasetType * ds)
{
#if GDAL_VERSION_NUM<2000000
return std::string(const_cast<GDALDatasetType *>(ds)->GetDriver()->GetName());
#else
return std::string(const_cast<GDALDatasetType *>(ds)->GetDriverName());
#endif
}
/*----------------------[GDAL 2.2 change on IsFieldSet()]---------------------*/
bool IsFieldSetAndNotNull(OGRFeature *feat, int index)
{
......
......@@ -689,7 +689,7 @@ private:
//Note : the GetDriver() Method has not been encapsulated in otb::ogr::DataSource,
//so we must access the OGR pointer by using .ogr()
std::string driverName(otb::ogr::version_proxy::GetDriverNameFromDataSource(&ogrDS->ogr()));
std::string driverName(ogrDS->ogr().GetDriverName());
if ( driverName.find("ESRI Shapefile") != std::string::npos)
{
otbAppLogINFO(<<"REPACK the Shapefile ..."<<std::endl);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment