Skip to content
Permalink
Browse files

RasterLite2: fix build against latest librasterlite2

  • Loading branch information
rouault committed Jan 11, 2020
1 parent 8504799 commit 9a6b35cb9e722ab86ae2277e3128342850e850e8
Showing with 10 additions and 5 deletions.
  1. +1 −0 gdal/ogr/ogrsf_frmts/sqlite/ogr_sqlite.h
  2. +9 −5 gdal/ogr/ogrsf_frmts/sqlite/rasterlite2.cpp
@@ -892,6 +892,7 @@ class OGRSQLiteDataSource final : public OGRSQLiteBaseDataSource
void ReloadLayers();

#ifdef HAVE_RASTERLITE2
void* GetRL2Context() const { return m_hRL2Ctxt; }
rl2CoveragePtr GetRL2CoveragePtr() const { return m_pRL2Coverage; }
GIntBig GetSectionId() const { return m_nSectionId; }
const double* GetGeoTransform() const { return m_adfGeoTransform; }
@@ -2280,7 +2280,9 @@ GDALDataset *OGRSQLiteDriverCreateCopy( const char* pszName,
memcpy( &cbk_data.adfGeoTransform, adfGeoTransform,
sizeof(adfGeoTransform) );

if( rl2_load_raw_tiles_into_dbms(poDS->GetDB(), cvg,
if( rl2_load_raw_tiles_into_dbms(poDS->GetDB(),
poDS->GetRL2Context(),
cvg,
osSectionName,
poSrcDS->GetRasterXSize(),
poSrcDS->GetRasterYSize(),
@@ -2370,7 +2372,6 @@ CPLErr OGRSQLiteDataSource::IBuildOverviews(
}
}

const int nMaxThreads = 1;
const int bForcedRebuild = 1;
const int bVerbose = 0;
const int bVirtualLevels = 1;
@@ -2379,21 +2380,24 @@ CPLErr OGRSQLiteDataSource::IBuildOverviews(
{
if( m_nSectionId >= 0 )
{
ret = rl2_build_section_pyramid( hDB, nMaxThreads,
ret = rl2_build_section_pyramid( hDB, GetRL2Context(),
m_osCoverageName, m_nSectionId,
bForcedRebuild, bVerbose);
}
else
{
ret = rl2_build_monolithic_pyramid (hDB, m_osCoverageName,
ret = rl2_build_monolithic_pyramid (hDB, GetRL2Context(),
m_osCoverageName,
bVirtualLevels,
bVerbose);

}
}
else
{
ret = rl2_build_monolithic_pyramid (hDB, m_osCoverageName,
ret = rl2_build_monolithic_pyramid (hDB,
GetRL2Context(),
m_osCoverageName,
bVirtualLevels,
bVerbose);
}

0 comments on commit 9a6b35c

Please sign in to comment.
You can’t perform that action at this time.