[Gdal-dev] .ovr overviews support for VRT format

Sebastien Grignard sebastien.grignard at archivideo.com
Wed Aug 25 10:03:02 EDT 2004


Hello.
I've seen that .ovr overviews creation was added to VRT format, but the 
produced overviews aren't used on read.
The included diff corrects this.

-- 
Sebastien Grignard
R&D Developer
Archivideo
40, rue des Veyettes - 35000 Rennes FRANCE
Phone: +033 2 99 86 30 20

-------------- next part --------------
Index: vrtsourcedrasterband.cpp
===================================================================
RCS file: /cvsroot/osrs/gdal/frmts/vrt/vrtsourcedrasterband.cpp,v
retrieving revision 1.2
diff -u -r1.2 vrtsourcedrasterband.cpp
--- vrtsourcedrasterband.cpp	11 Aug 2004 18:46:45 -0000	1.2
+++ vrtsourcedrasterband.cpp	25 Aug 2004 13:58:03 -0000
@@ -162,6 +162,19 @@
                            eBufType, nPixelSpace, nBufXSize );
         }
     }
+
+/* -------------------------------------------------------------------- */
+/*      Do we have overviews that would be appropriate to satisfy       */
+/*      this request?                                                   */
+/* -------------------------------------------------------------------- */
+    if( (nBufXSize < nXSize || nBufYSize < nYSize)
+        && GetOverviewCount() > 0 )
+      {
+        if( OverviewRasterIO( eRWFlag, nXOff, nYOff, nXSize, nYSize, 
+                              pData, nBufXSize, nBufYSize, 
+                              eBufType, nPixelSpace, nLineSpace ) == CE_None )
+          return CE_None;
+      }
     
 /* -------------------------------------------------------------------- */
 /*      Overlay each source in turn over top this.                      */


More information about the Gdal-dev mailing list