benchmarks
Not logged in

Back to RasterLite2 doc index



RasterLite2 reference Benchmarks

1.a) Color Satellite/Aerial Orthophotos (RGB: 3 bands, unsigned integer 8bit sample)

Input dataset

We'll use in this benchmark the well known True Marble imagery in its 500m version. This dataset corresponds to a worldwide mosaic of many reprocessed cloud-free Landsat scenes. All the input GeoTIFFs are freely available for download under the CC-BY license terms:
  1. TrueMarble.500m.21600x21600.A1.tif
  2. TrueMarble.500m.21600x21600.A2.tif
  3. TrueMarble.500m.21600x21600.B1.tif
  4. TrueMarble.500m.21600x21600.B2.tif
  5. TrueMarble.500m.21600x21600.C1.tif
  6. TrueMarble.500m.21600x21600.C2.tif
  7. TrueMarble.500m.21600x21600.D1.tif
  8. TrueMarble.500m.21600x21600.D2.tif
Each single GeoTIFF corresponds to a 21,600 x 21,600 pixels image (1.45 GB), so the whole input dataset requires about 11.5 GB of disk storage.

True Marble

Scope of this benchmark

Methodology

  1. a separate db-file was created and populated for each configuration being tested.
  2. then a monolithic multi-resolution Pyramid was added.
  3. finally 50 GeoTiff images at full resolution were extracted from each db-file: all exported images had different sizes and geographic positions, and exactly the same identical requests were issued on behalf on each db-file.
  4. as far as possible all timings have been measured under hot cache conditions.
The following is an excerpt of actual commands and SQL queries used in this benchmark:
$ rl2tool CREATE -db tm_png1024.sqlite -cov tm -smp UINT8 -pxl RGB \
  -cpr PNG -srid 4326 -res 0.00416666666666667 -tlw 1024 -tlh 1024
$ rl2tool IMPORT -db tm_png1024.sqlite -cov tm -dir . -ext tif
$ rl2tool PYRAMIDIZE-MONOLITHIC -db tm_png1024.sqlite -cov tm
$ export "SPATIALITE_SECURITY=relaxed"
$ sqlite3 tm_png1024.sqlite <test.sql
$

--------------
SELECT RL2_WriteGeoTiff('tm', './img122.tif', 1024, 512, MakePoint(-61.5, 52), 0.004167, 0.004167, 0, 'JPEG');

Objective comparative results

Test ConfigurationDB size
(after initial loading)
Final DB size
(including Pyramid)
LoadingPyramidizingExporting
Compression: NONE
tile size: 512 x 512
10.8 GB11.0 GB10 mins 3 secs2 mins 57 secs9.12 secs

Compression: DEFLATE
tile size: 256 x 256
1.49 GB1.52 GB16 mins 26 secs4 mins 9 secs9.01 secs
Compression: DEFLATE
tile size: 512 x 512
1.46 GB1.50 GB15 mins 29 secs3 mins 47 secs9.28 secs
Compression: DEFLATE
tile size: 1024 x 1024
1.48 GB1.51 GB15 mins 15 secs3 mins 54 secs11.95 secs
Compression: DEFLATE_NO
tile size: 512 x 512
1.85 GB1.89 GB13 mins 14 secs3 mins 17 secs11.29 secs
Compression: PNG
tile size: 256 x 256
1.51 GB1.54 GB21 mins 38 secs4 mins 42 secs10.60 secs
Compression: PNG
tile size: 512 x 512
1.48 GB1.51 GB21 mins 15 secs4 mins 25 secs10.74 secs
Compression: PNG
tile size: 1024 x 1024
1.47 GB1.50 GB21 mins 44 secs4 mins 28 secs13.52 secs
Compression: CHARLS
tile size: 512 x 512
1.70 GB1.74 GB15 mins 14 secs6 mins 34 secs20.18 secs
Compression: LZMA
tile size: 512 x 512
1.31 GB1.34 GB1 hour 17 mins 56 secs8 mins 23 secs20.91 secs
Compression: LZMA_NO
tile size: 512 x 512
1.56 GB1.34 GB1 hour 15 mins 46 secs8 mins 59 secs24.62 secs
Compression: WEBP (lossless)
tile size: 512 x 512
1.06 GB1.08 GB1 hour 16 mins 32 secs6 mins 58 secs18.0 secs
Compression: JPEG2000 (lossless)
tile size: 512 x 512
1.37 GB1.40 GB55 mins 50 secs30 mins 34 secs1 min 28 secs

Compression: JPEG
tile size: 256 x 256
270.0 MB276.0 MB10 mins 47 secs2 mins 50 secs7.50 secs
Compression: JPEG
tile size: 512 x 512
220.0 MB226.0 MB9 mins 20 secs2 mins 32 secs6.95 secs
Compression: JPEG
tile size: 1024 x 1024
212.0 MB217.0 MB8 mins 57 secs2 mins 33 secs7.53 secs
Compression: WEBP (lossy)
tile size: 512 x 512
131.0 MB135.0 MB49 mins 27 secs7 mins 12 secs15.40 secs
Compression: JPEG2000 (lossy Q=5)
tile size: 512 x 512
210.0 MB216.0 MB57 mins 5 secs16 mins 45 secs33.72 secs

Conclusions and final remarks

We clearly have three homogeneous groups and each group presents its own distinctive overall pattern: Few interesting details worth to be noted:

1.b) RGB (8 bit) multi-resolution Pyramid

Input dataset

Exactly the same as above.

Scope of this benchmark

Methodology

  1. recycling the tm_deflate512.sqlite DB prepared in the previous benchmark (RGB UINT8, DEFLATE compressed, 512 x 512 tiles).
  2. then rebuilding from scratch a monolithic multi-resolution Pyramid using any alternative configuration supported by RasterLite2.
  3. finally about 200 JPEG images at different arbitrary resolutions were extracted for each Pyramid configuration being tested: all extracted images had the same size but different resolutions and geographic positions, and exactly the same identical requests were issued on behalf on each configuration.
    The intended scope is the one to reply the typical actions performed by an user zooming in and out on different positions of a map.
The following is an excerpt of actual commands and SQL queries used in this benchmark:
$ rl2tool DE-PYRAMIDIZE -db tm_deflate512.sqlite -cov tm
$ sqlite3 tm_deflate512.sqlite
sqlite> vacuum;
sqlite> .quit
$ rl2tool PYRAMIDIZE-MONOLITHIC -db tm_deflate512.sqlite -cov tm -lev 1
$ sqlite3 tm_jpeg.sqlite <test.sql
$

--------------
SELECT RL2_GetMapImage('tm', BuildCircleMBR(-81.5, 12, 0.75), 512, 512, 'default', 'image/jpeg');

Objective comparative results

Test ConfigurationFinal DB size
(including Pyramid)
PyramidizingImages Extraction
-lev 1

all Pyramid levels are physical
no virtual levels are present
2.04 GB14 mins 47 secs20.44 secs
-lev 2

Pyramid levels are alternatively one physical and one virtual
1.60 GB6 mins 2 secs20.31 secs
-lev 3

every three Pyramid levels one is physical and the following two are virtual
(exactly corresponding the the default setting)
1.50 GB3 mins 58 secs29.77 secs

Conclusions and final remarks



2.a) Digital Elevation Model (DEM) (DATAGRID: 1 band, signed integer 16bit sample)

Input dataset

We'll use in this benchmark the well known SRTM DEM, and more precisely we'll use a reprocessed void filled sample covering the Italian peninsula.
This dataset consists in 9 ASCII Grids files and is freely available for download under the CC-BY-SA license terms:
  1. E005_N35.asc
  2. E005_N40.asc
  3. E005_N45.asc
  4. E010_N35.asc
  5. E010_N40.asc
  6. E010_N45.asc
  7. E015_N35.asc
  8. E015_N40.asc
  9. E015_N45.asc
Each single ASCII Grid corresponds to a 6,001 x 6,001 pixels image exactly covering 5 square degrees; the whole input dataset requires about 979 MB of disk storage.

SRTM Italy

Scope of this benchmark

Methodology

  1. a separate db-file was created and populated for each configuration being tested.
  2. then a monolithic multi-resolution Pyramid was added.
  3. finally 100 GeoTiff images at full resolution were extracted from each db-file: all exported images had different sizes and geographic positions, and exactly the same identical requests were issued on behalf on each db-file.
  4. as far as possible all timings have been measured under hot cache conditions.
The following is an excerpt of actual commands and SQL queries used in this benchmark:
$ rl2tool CREATE -db srtm_lzma1024.sqlite -cov srtm -smp INT16 -pxl DATAGRID \
  -cpr LZMA -srid 4326 -res 0.000833194467589 -nd -9999 -tlw 1024 -tlh 1024
$ rl2tool IMPORT -db srtm_lzma1024.sqlite -cov srtm -srid 4326 -dir . -ext asc
$ rl2tool PYRAMIDIZE-MONOLITHIC -db srtm_lzma1024.sqlite -cov srtm
$ export "SPATIALITE_SECURITY=relaxed"
$ sqlite3 srtm_lzma1024.sqlite <test.sql
$

--------------
SELECT RL2_WriteGeoTiff('srtm', './img86.tif', 1024, 1024, MakePoint(13.7, 37.6), 0.000833, 0.000833, 0, 'NONE');

Objective comparative results

Test ConfigurationDB size
(after initial loading)
Final DB size
(including Pyramid)
LoadingPyramidizingExporting
Compression: NONE
tile size: 256 x 256
659 MB670 MB3 mins 44 secs7.12 secs3.97 secs
Compression: NONE
tile size: 512 x 512
656 MB669 MB3 mins 27 secs6.34 secs4.07 secs
Compression: NONE
tile size: 1024 x 1024
656 MB678 MB3 mins 17 secs6.08 secs5.53 secs
Compression: DEFLATE
tile size: 256 x 256
147 MB150 MB4 mins 04 secs10.68 secs4.77 secs
Compression: DEFLATE
tile size: 512 x 512
143 MB146 MB4 mins 02 secs10.57 secs6.30 secs
Compression: DEFLATE
tile size: 1024 x 1024
143 MB146 MB3 mins 51 secs10.65 secs9.95 secs
Compression: DEFLATE_NO
tile size: 512 x 512
190 MB194 MB3 mins 58 secs8.19 secs8.58 secs
Compression: LZMA
tile size: 256 x 256
123 MB126 MB9 mins 16 secs33.49 secs13.80 secs
Compression: LZMA
tile size: 512 x 512
119 MB121 MB8 mins 52 secs31.20 secs18.42 secs
Compression: LZMA
tile size: 1024 x 1024
118 MB120 MB9 mins 22 secs35.22 secs27.28 secs
Compression: LZMA_NO
tile size: 512 x 512
143 MB146 MB8 mins 36 secs38.23 secs26.63 secs

Conclusions and final remarks

Both compression algorithms (DEFLATE and LZMA) tested in this benchmark are of the lossless type, so any possible quality difference is certainly excluded. No data information loss will never be possible. So the unique interesting variables to be compared are size and time.

DEFLATE confirms to be a good performer; it always ensures intersting compression ratios and it's pretty fast.

LZMA surely ensures an even better compression but this is at the cost of a remarkable slowness; and the really bad new is in that it's noticeably slow even while decompressing.

Few interesting details worth to be noted:

2.b) DEM (INT16) multi-resolution Pyramid

Input dataset

Exactly the same as above.

Scope of this benchmark

Methodology

  1. recycling the srtm_deflate512.sqlite DB prepared in the previous benchmark (DATAGRID INT16, DEFLATE compressed, 512 x 512 tiles).
  2. then rebuilding from scratch a monolithic multi-resolution Pyramid using any alternative configuration supported by RasterLite2.
  3. finally about 150 JPEG images at different arbitrary resolutions and applying different Styling rules were extracted for each Pyramid configuration being tested: all extracted images had the same size but different resolutions and geographic positions, and exactly the same identical requests were issued on behalf on each configuration.
    The intended scope is the one to reply the typical actions performed by an user zooming in and out on different positions of a map.
The following is an excerpt of actual commands and SQL queries used in this benchmark:
$ rl2tool DE-PYRAMIDIZE -db srtm_deflate512.sqlite -cov srtm
$ sqlite3 srtm_deflate512.sqlite
sqlite> vacuum;
sqlite> .quit
$ rl2tool PYRAMIDIZE-MONOLITHIC -db srtm_deflate512.sqlite -cov srtm -lev 1
$ sqlite3 srtm_deflate.sqlite512 <test.sql
$

--------------
SELECT RL2_GetMapImage('srtm', BuildCircleMBR(12.5, 42.5, 0.5), 1024, 1024, 'default', 'image/jpeg');
SELECT RL2_GetMapImage('srtm', BuildCircleMBR(12.5, 42.5, 0.5), 1024, 1024, 'srtm_plus', 'image/jpeg');
SELECT RL2_GetMapImage('srtm', BuildCircleMBR(12.5, 42.5, 0.5), 1024, 1024, 'srtm_plus_ShRel_100', 'image/jpeg');
The following are visual examples of the Styling rules being tested:
SRTM Italy default       SRTM Italy color       SRTM Italy shaded relief
default
mapping elevations to grayscale
      srtm_plus
mapping elevations to false-colors
      srtm_plus_ShRel_100
mapping elevations to false-colors
and applying shaded relief

Objective comparative results

Test ConfigurationFinal DB size
(including Pyramid)
PyramidizingStyling:
default
Styling:
color rules
Styling:
shaded relief
-lev 1

all Pyramid levels are physical
no virtual levels are present
201 MB47.89 secs10.67 secs13.54 secs57 secs
-lev 2

Pyramid levels are alternatively one physical and one virtual
156 MB16.98 secs11.15 secs13.91 secs58.36 secs
-lev 3

every three Pyramid levels one is physical and the following two are virtual
(exactly corresponding the the default setting)
146 MB10.82 secs12.33 secs15.24 secs1 min 5 secs

Conclusions and final remarks



3.a) Panchromatic Satellite Imagery (GRAYSCALE: 1 band, unsigned integer 16bit sample)

Input dataset

We'll use in this benchmark the well known Landsat 8 imagery only considering its high-resolution panchromatic band (B8: 15m / pixel). So we'll process a single Landsat8 scene:
  1. LC81920292013183LGN00_B8.TIF
This GeoTIFF corresponds to a 15,301 x 15,581 pixels image requiring about 454 MB of disk storage.

Landsat8

Scope of this benchmark

Please note: this benchmark is very similar to the previous one, because the internal encoding is always is the same in both cases, i.e. DATAGRID 16bit; anyway the statistical distribution of pixel values is completely different.
That's not all: in this case we have unsigned values, so a richest set of compressing algorithms is supported.

Methodology

  1. a separate db-file was created and populated for each configuration being tested.
  2. then a monolithic multi-resolution Pyramid was added.
  3. finally 120 GeoTiff images at full resolution were extracted from each db-file: all exported images had different sizes and geographic positions, and exactly the same identical requests were issued on behalf on each db-file.
  4. as far as possible all timings have been measured under hot cache conditions.
The following is an excerpt of actual commands and SQL queries used in this benchmark:
$ rl2tool CREATE -db landsat_none.sqlite -cov landsat8 -smp UINT16 \
  -pxl DATAGRID -cpr NONE -srid 32632 -res 15 -nd 0
$ rl2tool IMPORT -db landsat_none.sqlite -cov landsat8 \
  -src ./LC81920292013183LGN00_B8.TIF
$ rl2tool PYRAMIDIZE-MONOLITHIC -db landsat_none.sqlite -cov landsat8
$ export "SPATIALITE_SECURITY=relaxed"
$ sqlite3 landsat_none.sqlite <test.sql
$

--------------
SELECT RL2_WriteGeoTiff('landsat8', './img101.tif', 1024, 1024, MakePoint(701957.5, 4942987.65), 15, 15, 0, 'NONE');

Objective comparative results

Test ConfigurationDB size
(after initial loading)
Final DB size
(including Pyramid)
LoadingPyramidizingExporting
Compression: NONE
tile size: 512 x 512
472 MB481 MB1 mins 25 secs4.77 secs7.45 secs
Compression: DEFLATE
tile size: 512 x 512
256 MB260 MB1 mins 45 secs10.18 secs13.10 secs
Compression: DEFLATE_NO
tile size: 512 x 512
268 MB272 MB1 mins 44 secs7.58 secs16.18 secs
Compression: PNG
tile size: 512 x 512
251 MB255 MB2 mins 6 secs11.32 secs14.44 secs
Compression: LZMA
tile size: 512 x 512
233 MB236 MB4 mins 45 secs48.76 secs57.47 secs
Compression: LZMA_NO
tile size: 512 x 512
241 MB245 MB4 mins 55 secs51.28 secs59.31 secs
Compression: CharLS
tile size: 512 x 512
206 MB210 MB1 mins 42 secs20.82 secs26.78 secs
Compression: Jpeg2000 (lossless)
tile size: 512 x 512
205 MB209 MB5 mins 14 secs2 mins 45 secs3 mins 7 secs
Compression: Jpeg2000 (lossy Q=5)
tile size: 512 x 512
22.87 MB23.3 MB4 mins 15 secs40.49 secs36.05 secs

Conclusions and final remarks

Yet another confirmation of what we've already discovered during the previous benchmarks:
Few very important remarks about lossless compressors:
  • "Which one of them always ensures the higher compression ratio ?"
    a question like this is intrinsically meaningless. It mainly depends on the statistical distribution of pixel values: the same algorithm can show brilliant performances on some dataset and can be absolutely disappointing while compressing another datasets.
    The relative ranking of each algorithms can easily change accordingly to the specific nature of each dataset to be compressed.
  • just as a coarse rule-of-the-thumb, LZMA, Jpeg2000 and WebP can usually be expected to ensure very good compression ratios: but this always is at the expenses of an huge performance degradation (i.e. they are intolerably slow), and the practical results in storage terms are not always worth this sacrifice.
  • CharLS seems to be rather unpredictable: sometimes it's effectively able to reach very high compression factors, but in other cases it's not at all brilliant.
  • both DEFLATE and PNG are average performers; they'll never be the best of best in compression ratio terms, but they are always reasonably fast.
Conclusion: there is no absolute rule. Use your own common good sense, and perform some small-scale preliminary testing before choosing the best fit compressor for your data.




3.b) Grayscale (UINT16) multi-resolution Pyramid

Input dataset

Exactly the same as above.

Scope of this benchmark

Methodology

  1. recycling the landsat_deflate.sqlite DB prepared in the previous benchmark (DATAGRID UINT16, DEFLATE compressed, 512 x 512 tiles).
  2. then rebuilding from scratch a monolithic multi-resolution Pyramid using any alternative configuration supported by RasterLite2.
  3. finally about 150 JPEG images at different arbitrary resolutions and applying different Styling rules (contrast enhancements) were extracted for each Pyramid configuration being tested: all extracted images had the same size but different resolutions and geographic positions, and exactly the same identical requests were issued on behalf on each configuration.
    The intended scope is the one to reply the typical actions performed by an user zooming in and out on different positions of a map.
The following is an excerpt of actual commands and SQL queries used in this benchmark:
$ rl2tool DE-PYRAMIDIZE -db landsat_deflate.sqlite -cov landsat8
$ sqlite3 landsat_deflate.sqlite
sqlite> vacuum;
sqlite> .quit
$ rl2tool PYRAMIDIZE-MONOLITHIC -db landsat_deflate.sqlite -cov landsat8 -lev 1
$ sqlite3 landsat_deflate.sqlite <test.sql
$

--------------
SELECT RL2_GetMapImage('landsat8', BuildCircleMBR(701857.5, 4942042.5, 24000), 512, 512, 'default', 'image/jpeg');
SELECT RL2_GetMapImage('landsat8', BuildCircleMBR(701857.5, 4942042.5, 24000), 512, 512, 'gamma_2.5', 'image/jpeg');
SELECT RL2_GetMapImage('landsat8', BuildCircleMBR(701857.5, 4942042.5, 24000), 512, 512, 'histogram', 'image/jpeg');
SELECT RL2_GetMapImage('landsat8', BuildCircleMBR(701857.5, 4942042.5, 24000), 512, 512, 'normalize', 'image/jpeg');
The following are visual examples of the Styling rules (contrast enhancement) being tested:
Landsat default       Landsat8 gamma       Landsat8 histogram       Landsat8 normalize
default       gamma 2.5       histogram       normalize

Objective comparative results

Test ConfigurationFinal DB size
(including Pyramid)
PyramidizingStyling:
default
Styling:
gamma 2.5
Styling:
histogram
Styling:
normalize
-lev 1

all Pyramid levels are physical
no virtual levels are present
342 MB47.66 secs14.50 secs14.62 secs14.79 secs14.63 secs
-lev 2

Pyramid levels are alternatively one physical and one virtual
273 MB18.02 secs15.30 secs15.59 secs15.93 secs15.75 secs
-lev 3

every three Pyramid levels one is physical and the following two are virtual
(exactly corresponding the the default setting)
260 MB10.72 secs16.01 secs16.22 secs16.34 secs16.23 secs

Conclusions and final remarks



4.a) RGB + IR Aerial Imagery (MULTIBAND: 4 bands, unsigned integer 8bit samples)

Input dataset

Aerial imagery supporting standard RGB bands plus an extra Near InfraRed (NIR) band is quickly becoming widespread in recent times.
The extra NIR band allows visualizing false colors images, thus making an easier task differentiating and correctly recognizing the vegetation and the water bodies.
This specific kind of aerial imagery is a very popular option for many remote sensing projects related to agricultural activities.

In the current benchmark we'll use a NAIP quadrant freely distributed by Indiana University; and most precisely we'll download the following four GeoTIFF images:
  1. m_3808409_ne_16_1_20120607
  2. m_3808409_nw_16_1_20120607
  3. m_3808409_se_16_1_20120607
  4. m_3808409_sw_16_1_20120607
Each GeoTIFF corresponds to a 6,180 x 7,600 pixels image; the whole quadrant requires about 720 MB of disk storage.

NAIP

Scope of this benchmark

Methodology

  1. a separate db-file was created and populated for each configuration being tested.
  2. then a monolithic multi-resolution Pyramid was added.
  3. finally 100 GeoTiff images at full resolution were extracted from each db-file: all exported images had different sizes and geographic positions, and exactly the same identical requests were issued on behalf on each db-file.
  4. as far as possible all timings have been measured under hot cache conditions.
The following is an excerpt of actual commands and SQL queries used in this benchmark:
$ rl2tool CREATE -db indiana_none.sqlite -cov naip -smp UINT8 \
  -pxl MULTIBAND -bds 4 -cpr NONE -srid 26916 -res 1
$ rl2tool IMPORT -db indiana_none.sqlite -cov naip -dir . -ext tif
$ rl2tool PYRAMIDIZE-MONOLITHIC -db indiana_none.sqlite -cov naip
$ export "SPATIALITE_SECURITY=relaxed"
$ sqlite3 indiana_none.sqlite <test.sql
$

--------------
SELECT WriteGeoTiff('naip', './img88.tif', 1024, 1024, MakePoint(679195, 4297632), 1.0, 1.0, 0, 'NONE');

Objective comparative results

Test ConfigurationDB size
(after initial loading)
Final DB size
(including Pyramid)
LoadingPyramidizingExporting
Compression: NONE
tile size: 512 x 512
788 MB802 MB1 mins 6 secs9.96 secs14.58 secs

Compression: DEFLATE
tile size: 512 x 512
529 MB537 MB1 mins 44 secs17.23 secs22.26 secs
Compression: DEFLATE_NO
tile size: 512 x 512
633 MB642 MB1 mins 38 secs15.57 secs26.82 secs
Compression: PNG
tile size: 512 x 512
530 MB538 MB2 mins 19 secs20.77 secs26.00 secs
Compression: CharLS
tile size: 512 x 512
560 MB568 MB2 mins 35 secs1 min 2 secs1 min 13 secs
Compression: LZMA
tile size: 512 x 512
464 MB471 MB8 mins 51 secs1 min 29 secs1 min 31 secs
Compression: LZMA_NO
tile size: 512 x 512
556 MB563 MB7 mins 52 secs1 min 34 secs1 min 51 secs
Compression: WebP (lossless)
tile size: 512 x 512
408 MB414 MB13 mins 15 secs51.31 secs47.94 secs
Compression: Jpeg2000 (lossless)
tile size: 512 x 512
481 MB488 MB11 mins 5 secs5 mins 32 secs6 mins 8 secs

Compression: WebP (lossy)
tile size: 512 x 512
173 MB176 MB8 mins 3 secs39.23 secs42.02 secs
Compression: Jpeg2000 (lossy Q=5)
tile size: 512 x 512
44.44 MB45.1 MB7 mins 57 secs1 min 18 secs1 mins 38 secs

Conclusions and final remarks

More or less we still continue noticing the same general trends already seen on the last two benchmarks. Many lossless codecs (with the notable exception of WebP) fail to reach high compression ratios as we were probably expecting; but there is very clear explanation for all this:

4.b) MULTIBAND (UINT8, 4 bands) multi-resolution Pyramid

Input dataset

Exactly the same as above.

Scope of this benchmark

Methodology

  1. recycling the indiana_deflate.sqlite DB prepared in the previous benchmark (MULTIBAND UINT8, DEFLATE compressed, 512 x 512 tiles).
  2. then rebuilding from scratch a monolithic multi-resolution Pyramid using any alternative configuration supported by RasterLite2.
  3. finally about 100 JPEG images at different arbitrary resolutions and applying different Styling rules (band selection) were extracted for each Pyramid configuration being tested: all extracted images had the same size but different resolutions and geographic positions, and exactly the same identical requests were issued on behalf on each configuration.
    The intended scope is the one to reply the typical actions performed by an user zooming in and out on different positions of a map.
The following is an excerpt of actual commands and SQL queries used in this benchmark:
$ rl2tool DE-PYRAMIDIZE -db indiana_deflate.sqlite -cov naip
$ sqlite3 indiana_deflate.sqlite
sqlite> vacuum;
sqlite> .quit
$ rl2tool PYRAMIDIZE-MONOLITHIC -db indiana_deflate.sqlite -cov naip -lev 1
$ sqlite3 indiana_deflate.sqlite <test.sql
$

--------------
SELECT RL2_GetMapImage('naip', BuildCircleMBR(676195, 4296632, 256), 512, 512, 'default', 'image/jpeg');
SELECT RL2_GetMapImage('naip', BuildCircleMBR(676195, 4296632, 256), 512, 512, 'style_rgb', 'image/jpeg');
SELECT RL2_GetMapImage('naip', BuildCircleMBR(676195, 4296632, 256), 512, 512, 'style_ir_rg', 'image/jpeg');
SELECT RL2_GetMapImage('naip', BuildCircleMBR(676195, 4296632, 256), 512, 512, 'style_gr_ir', 'image/jpeg');
The following are visual examples of the Styling rules (band selection) being tested:
NAIP default       NAIP Red+Green+Blue       NAIP InfraRed+Red+Green       NAIP Green+Red+InfraRed
default
band #0 (Red) as grayscale
      RGB
natural colors
      false colors
NIR + R + G bands
      false colors
G + R + NIR bands

Objective comparative results

Test ConfigurationFinal DB size
(including Pyramid)
PyramidizingStyling:
default
Styling:
RGB
Styling:
NIR+R+G
Styling:
G+R+NIR
-lev 1

all Pyramid levels are physical
no virtual levels are present
691 MB1 min 17 secs12.37 secs14.07 secs14.00 secs14.04 secs
-lev 2

Pyramid levels are alternatively one physical and one virtual
562 MB28.84 secs13.18 secs14.89 secs14.89 secs14.91 secs
-lev 3

every three Pyramid levels one is physical and the following two are virtual
(exactly corresponding the the default setting)
537 MB17.55 secs20.92 secs22.69 secs22.63 secs22.52 secs

Conclusions and final remarks



5.a) 1-BIT topographical maps (MONOCHROME)

Input dataset

We'll use exactly the same GeoTIFF files we've already encountered in the trento-ctr tutorial.

Scope of this benchmark

Methodology

  1. a separate db-file was created and populated for each configuration being tested.
  2. then a monolithic multi-resolution Pyramid was added.
  3. finally 120 GeoTiff images at full resolution were extracted from each db-file: all exported images had different sizes and geographic positions, and exactly the same identical requests were issued on behalf on each db-file.
  4. as far as possible all timings have been measured under hot cache conditions.
The following is an excerpt of actual commands and SQL queries used in this benchmark:
$ rl2tool CREATE -db mono_fax4.sqlite -cov mono -smp 1-BIT \
  -pxl MONOCHROME -cpr FAX4 -srid 25832 -res 0.67730
$ rl2tool IMPORT -db mono_fax4.sqlite -cov mono -srid 25832 \
  -dir . -ext tif
$ rl2tool PYRAMIDIZE-MONOLITHIC -db mono_fax4.sqlite -cov mono
$ export "SPATIALITE_SECURITY=relaxed"
$ sqlite3 mono_fax4.sqlite <test.sql
$

--------------
SELECT WriteGeoTiff('mono', './img89.tif', 1024, 1024, MakePoint(665370, 5102333), 0.67730, 0.67730, 0, 'NONE');

Objective comparative results

Test ConfigurationDB size
(after initial loading)
Final DB size
(including Pyramid)
LoadingPyramidizingExporting
Compression: NONE
tile size: 512 x 512
111 MB200 MB49.37 secs4 mins 1 sec7.58 secs
Compression: DEFLATE
tile size: 512 x 512
45.4 MB134 MB42 secs4 mins 9 secs5.15 secs
Compression: DEFLATE_NO
tile size: 512 x 512
37.9 MB127 MB45 secs4 mins 7 secs4.92 secs
Compression: LZMA
tile size: 512 x 512
40.6 MB130 MB2 mins 3 secs4 mins 18 secs12.30 secs
Compression: LZMA_NO
tile size: 512 x 512
31.1 MB120 MB2 mins 18 secs4 mins 15 secs10.30 secs
Compression: PNG
tile size: 512 x 512
38.6 MB128 MB1 mins 10 secs4 mins 59 secs8.47 secs
Compression: FAX4
tile size: 512 x 512
29.8 MB119 MB56.16 secs4 mins 59 secs7.36 secs

Conclusions and final remarks

1-bit MONOCHROME samples are rather exceptional under many aspects: monochromatic simple downsampling
This first figure exactly corresponds to a rescaled 1-bit image produced by another sw tool adopting a simpler and unsophisticated downsampling algorithm.
As you can easily notice, the visual quality is indecently poor, and any fine grained detail has gone completely lost when rescaling; this one isn't a map, it simply is meaningless digital noise.

monochromatic interpolated downsampling
This second figure exactly corresponds to a rescaled 1-bit image produced by RasterLite2 by applying a more advanced algorithm based on halftone interpolated pixels (Grayscale: 256 shades of gray). The difference between the two alternative approaches is self-explanatory.


5.b) 1-BIT (MONOCHROME) multi-resolution Pyramid

Input dataset

Exactly the same as above.

Scope of this benchmark

Methodology

  1. recycling the mono_fax4.sqlite DB prepared in the previous benchmark (MONOCHROME 1-BIT, FAX4 compressed, 512 x 512 tiles).
  2. then rebuilding from scratch a monolithic multi-resolution Pyramid using any alternative configuration supported by RasterLite2.
  3. finally about 100 JPEG images at different arbitrary resolutions and applying different Styling rules (re-coloring) were extracted for each Pyramid configuration being tested: all extracted images had the same size but different resolutions and geographic positions, and exactly the same identical requests were issued on behalf on each configuration.
    The intended scope is the one to reply the typical actions performed by an user zooming in and out on different positions of a map.
The following is an excerpt of actual commands and SQL queries used in this benchmark:
$ rl2tool DE-PYRAMIDIZE -db mono_fax4.sqlite -cov mono
$ sqlite3 mono_fax4.sqlite
sqlite> vacuum;
sqlite> .quit
$ rl2tool PYRAMIDIZE-MONOLITHIC -db mono_fax4.sqlite -cov mono -lev 1
$ sqlite3 mono_fax4.sqlite <test.sql
$

--------------
SELECT RL2_GetMapImage('mono', BuildCircleMBR(665370, 5102333, 750), 512, 512, 'default', 'image/png');
SELECT GetMapImage('mono', BuildCircleMBR(665370, 5102333, 750), 512, 512, 'monochrome_red', 'image/png');
The following are visual examples of the Styling rules (re-coloring) being tested:
mono default       mono red
default
black and transparency
      re-colored
red and transparency

Objective comparative results

Test ConfigurationFinal DB size
(including Pyramid)
PyramidizingStyling:
default
Styling:
Red
-lev 1

all Pyramid levels are physical
no virtual levels are present
119 MB4 mins 50 secs10.79 secs16.02 secs
-lev 2

Pyramid levels are alternatively one physical and one virtual
93.4 MB3 mins 36 secs11.65 secs18.42 secs
-lev 3

every three Pyramid levels one is physical and the following two are virtual
(exactly corresponding the the default setting)
86.2 MB3 mins 22 secs13.72 secs18.09 secs

Conclusions and final remarks




Back to RasterLite2 doc index