Keywords

1 Introduction

The issue of influence of raster compression on data quality had been solved in many articles. For example Vatolin et al. (2005) deal with comparing several software tools for compression data according to JPEG 2000 format. As an introduction on compressing DEM can be given in thesis of Inanc (2008), witch provides overview of compressions techniques applied for DEM. Mittal et al. (2013) studied, how data for DEM creation can be changed via compression of source satellite images. Gladkova and Grossberg (2006) and Gladkova et al. (2007) focused their research on analysing several compression techniques including JPEG 2000 to MODIS and hyperspectral data.

A lot of papers describe technical specification prepared by software producers. There are also results of several compression ratios and their impact to error in the resulting DEM published by Microimages, Inc. (2009). They analysed impact of loss JPEG 2000 compression to ASTER data, which is quite high.

Ben-Moshe et al. (2007) describes a new technique for simplification of DEM based on analyses of DEM before compression. It is named Image Compression Terrain Simplification (ICTS). The ITCS technique is compared with another techniques including JPEG 2000 compression technique. The paper shows results that ICTS gives similar or even better results for simplification of DEM than JPEG 2000. What is missing in the paper are parameters used for JPEG 2000 compression, mainly compression ratio.

2 Methods and Software

2.1 Methods

The research was focused on two basic ideas:

  • How sensitive is the error in the compressed data to parameter BLOCKSIZE and can we use it to reduce the impact of the compression to the DEM quality.

  • Can the mean filtering of the data before compression produce less error in the compressed data.

The comparison was based on the simple procedure:

  • The original DEM was filtered by mean filter.

  • The original DEM and the result of filtering were compressed by loss wavelet compression and stored to JPEG 2000 format (with different parameters described later).

  • The compressed files were uncompressed and compared with original data using simple map algebra (difference = original_dem − compressed_dem).

  • For the difference layers was calculated value that represents average error realised by data compression.

Used mean filter has the following values:

  • MATRIX 3

  • 1 1 1

  • 1 1 1

  • 1 1 1

  • DIVISOR 9

The compression has been done in four ratios:

  • 200:1

  • 100:1

  • 20:1

  • 10:1

The BLOCKSIZE parameter has been specified in three values:

  • 512

  • 1024

  • 2048

3 GDAL

The GDAL allow to use three different open source libraries for wavelet compression according to JPEG 2000 specification. Unfortunately the only one was used for our research purposes. The following table shows problems with each library (Table 1).

Table 1 Libraries for GDAL

The used library was OpenJPEG. There were problems with several tested files, but most of the tested files were compressed correctly. This is probably a bug in the library and should be corrected in the future.

The OpenJPEG library was build from SVN repository to have a latest version of the library.

The basic command for compression to JPEG2000 with OpenJPEG library was:

gdal_translate -of “JP2OpenJPEG” -co “QUALITY = 1” -co “BLOCKSIZEX = 1024” -co “BLOCKSIZEY = 1024” demfilter1.tif demfilter1.tif.j2k

The parameter QUALITY has been set to values: 10, 5, 1, 0.5 to reach the specified compression ratios. The parameters BLOCKSIZE has been set to values: 512, 1024, 2048. Other parameters were used with default values, because they do not have an impact to a quality of a compression.

4 Grass GIS

GRASS GIS was used for filtering the original DEM with mean filter, for calculating with map algebra and for counting average error.

The command for filtering the data was:

r.mfilter input = dem output = demfilter1 filter = filter1.txt

The command for map algebra was:

r.mapcalc ‘dem_dem.tif.j2k.tif = dem-dem.tif.j2k.tif’

5 Data

The library was tested on five tiles from ASTER DEM version 2. Each tile has a resolution 3601 × 3601 pixels and spatial resolution about 0.01°. In the following table are listed basic characteristics for selected tiles.

From Table 2. is obvious that mainly the flat areas were selected. That selection was made by expectations that for the flat areas the filtering should produce the best results.

Table 2 Libraries for GDAL

The data were available in GeoTIFF format without compression, with encoding of values using range of UInt16 domain. The size of each tile in original format was about 28 MB.

6 Results

The following five tables show the results of calculations. The results are discussed in the chapter discussion and conclusion. The results are based on average error that was counted as sum of errors for each individual pixel divided by number of pixels.

The average error can be used for several purposes, but for other several purposes can be important distribution of the error in the whole DEM and maximal error. The following two tables show distribution of error for compression ratio 100:1 for the tile N23E026 with BLOCKSIZE 1024. The maximum error for not filtered data was 47 m and for filtered data it was 53 m.

The following two tables show distribution of error for compression ratio 20:1 for the tile N49E017 with BLOCKSIZE 1024. The maximum error for not filtered data was 6 m and for filtered data it was 33 m.

7 Discussion and Conclusion

From Tables 3, 4, 5, 6 and 7 is obvious that the BLOCKSIZE 1024 gives the smallest error for all levels of compression and for all tested tiles. So there is not need for ASTER DEM data to use another than default BLOCKSIZE value that is 1024. For other discussion we used only results with BLOCKSIZE = 1024.

Table 3 Impact of compression to tile N23E026
Table 4 Impact of compression to tile N33E081
Table 5 Impact of compression to tile N49E017
Table 6 Impact of compression to tile N51E021
Table 7 Impact of compression to tile S24E125

Tables 3, 4, 5, 6 and 7 show that for compression ratio 200:1 the filtered data give smaller error than original data. The difference between errors is between 0.007 and 0.579 m.

For the compression ratio 100:1 are the results similar (except the tile with highest elevation). The difference between errors is between −0.025 and 0.948 m. The result for the tile N33E081 is close to zero, but what is more interesting is that the result for tile N23E026 is close to 1 m. For the tile N23E026 is the average error for not filtered data about 4 m and for filtered data 3 m. That is improve in 25 % and it could be interesting for several applications. When considering the distribution of the error we can see in the Tables 8 and 9 that the distribution is not so different.

Table 8 Error distribution for not filtered data for the tile N23E026 with compression ratio 100:1
Table 9 Error distribution for filtered data for the tile N23E026 with compression ratio 100:1
Table 10 Error distribution for not filtered data for the tile N49E017 with compression ratio 20:1

For the compression ratio 20:1 are the results (except the tile N23E026, where are the filtered data with higher error) even better when comparing average error. The difference between errors is between −0.161 and 1.065 m. For two tiles (N49E017 and S24E125) is the difference between errors about 1 m and that is improve in 33 % and it could be interesting for several applications. But we have to consider the distribution of the error and from Table 11 is obvious that the number of pixels with error higher than 3 m is enormous in comparison to the results of not filtered data described in the Table 10. Also the maximum error is 33 m for filtered data.

Table 11 Error distribution for filtered data for the tile N49E017 with compression ratio 20:1

For the compression ratio 10:1 are all the results better for not filtered data.

The test should be done for more tiles of ASTER data and for another DEM data as well. Even from presented results we can conclude, that when are DEM data (from ASTER source) compressed into JPEG 2000 format with GDAL tool and OpenJPEG library that the user should consider filtering the data. When the compression ratio is from 20:1 to 200:1 then the filtering can improve the average error or left the average error at the same size. The improvement of the error can reach 33 % of the average error. When the compression is 100:1 then the distributions of the error for not filtered and filtered data are almost equal.

The final conclusion is that the filtering should be used mainly for ratio 100:1 for areas with small variance in elevation.

As described in Ben-Moshe et al. (2007) ICTS technique gives similar or even better results for simplification of DEM than JPEG 2000. What is missing in the paper are parameters used for JPEG 2000 compression, mainly compression ratio. We were not able to test ICTS technique yet, so it would be very interesting to do a research in that area. We would like to recommend to compare our technique with ICTS technique for DEM compression (simplification).