File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1320,6 +1320,15 @@ std::unique_ptr<GTiffGrid> GTiffDataset::nextGrid() {
13201320 m_ifdIdx++;
13211321 m_hasNextGrid = TIFFReadDirectory (m_hTIFF) != 0 ;
13221322 m_nextDirOffset = TIFFCurrentDirOffset (m_hTIFF);
1323+
1324+ // If the TIFF file contains multiple grids, append the index of the grid
1325+ // in the grid name to help debugging.
1326+ if (m_ifdIdx >= 2 || m_hasNextGrid) {
1327+ ret->m_name += " (index " ;
1328+ ret->m_name += std::to_string (m_ifdIdx); // 1-based
1329+ ret->m_name += ' )' ;
1330+ }
1331+
13231332 return ret;
13241333}
13251334
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ struct ExtentAndRes {
5959
6060class PROJ_GCC_DLL Grid {
6161 protected:
62+ friend class GTiffDataset ;
6263 std::string m_name;
6364 int m_width;
6465 int m_height;
You can’t perform that action at this time.
0 commit comments