Changeset: 0bee9cc3be8e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0bee9cc3be8e
Modified Files:
        sql/backends/monet5/vaults/gdal/gdal.c
        sql/backends/monet5/vaults/geotiff/geotiff.c
Branch: SciQL-2
Log Message:

gdal & geotiff: added some more documentation


diffs (44 lines):

diff --git a/sql/backends/monet5/vaults/gdal/gdal.c 
b/sql/backends/monet5/vaults/gdal/gdal.c
--- a/sql/backends/monet5/vaults/gdal/gdal.c
+++ b/sql/backends/monet5/vaults/gdal/gdal.c
@@ -190,6 +190,11 @@ GDALloadGreyscaleImage(bat *x, bat *y, b
                }
                data_sht = (sht *)Tloc(resI, BUNfirst(resI));
 
+               /* Read image line-wise and turn GeoTIFF's row-major order
+                * into SciQL's column-major order. */
+               /* If we would care to data BAT sequetially, i.e., keeping
+                * the row-major order, we would need to swap the order of
+                * the & y columns / BATs in the final image array */
                for(i = 0; i < len; i++) {
                        if (GDALRasterIO(hBand, GF_Read, 0, i, wid, 1, linebuf, 
wid, 1, GDT_Byte, 0, 0) != CE_Failure) {
                                for (j = 0; j < wid; j++) 
diff --git a/sql/backends/monet5/vaults/geotiff/geotiff.c 
b/sql/backends/monet5/vaults/geotiff/geotiff.c
--- a/sql/backends/monet5/vaults/geotiff/geotiff.c
+++ b/sql/backends/monet5/vaults/geotiff/geotiff.c
@@ -191,6 +191,12 @@ GTIFFloadGreyscaleImage(bat *x, bat *y, 
 
                MALLOC_CHECK(sht, wid);
                data_sht = (sht *)Tloc(resI, BUNfirst(resI));
+
+               /* Read image line-wise and turn GeoTIFF's row-major order
+                * into SciQL's column-major order. */
+               /* If we would care to data BAT sequetially, i.e., keeping
+                * the row-major order, we would need to swap the order of
+                * the & y columns / BATs in the final image array */
                for( i = 0; i < len; i++){
                        if (TIFFReadScanline(tif, linebuf, i, 0) != -1) {
                                for (j = 0; j < wid; j++) 
@@ -205,6 +211,12 @@ GTIFFloadGreyscaleImage(bat *x, bat *y, 
 
                MALLOC_CHECK(int, wid*2);
                data_int = (int *)Tloc(resI, BUNfirst(resI));
+
+               /* Read image line-wise and turn GeoTIFF's row-major order
+                * into SciQL's column-major order. */
+               /* If we would care to data BAT sequetially, i.e., keeping
+                * the row-major order, we would need to swap the order of
+                * the & y columns / BATs in the final image array */
                for( i = 0; i < len; i++){
                        if (TIFFReadScanline(tif, linebuf, i, 0) != -1) {
                                for (j = 0; j < wid; j++) 
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to