Source files containing raster images can have very large amount of data. If that's the case, storing image features in their native format would result in a considerable increase of GDB files size. To avoid this trouble one can use the following means provided by ObjectLand:
lossless compression of raster data;
changing of color depth and raster array dimensions resulting in reduction of data size with acceptable image quality retained.
Setting of usage of these means is performed in the window of image feature editing when the tab Optimization is selected (figure 17-15).
Figure 17-15. Image editing window, page “Optimization”
In the pane Properties the basic quantitative attributes of a raster image are shown, such as width and height of the pixels array, number of bits per a pixel (this number defines the color depth, i.e. the number of available colors) and also number of pixels per inch, which is defined by the current Windows settings.
The system can use graphic data compression algorithms to store raster images in the GDB. When displaying the image, the system perform raster data decompression automatically.
The degree of compression achieved heavily depends on the image nature and on the number of colors used. If there are many image features stored in the GDB, then compression can considerably reduce the size of the GDB files. The effect of compression on the speed of raster display can be both positive and negative. On the one hand, reducing of the data file size results in decreasing time for reading data from a disk. On the other hand, decompression algorithms require some time for their execution. ObjectLand provides the user with a possibility to choose compressed or non-compressed format of internal representation for every particular image feature.
The checkbox Compression indicates whether compressed format is used for the present image feature or not. When the button Calculate is pushed the system evaluates how effectively compression may be performed. For example, 70% compression means that the raster in compressed form will occupy 30% from the disk memory size which it would occupy in non-compressed form. On the basis of the evaluation the user can make a decision whether to use compression for the present feature and to check the box Compression or to clear it. After pushing the button OK internal representation of the feature will be changed accordingly.
The pane Optimization methods gives the user a possibility to reduce data size for the image feature using format conversions which results in some quality loss for the image. Before executing the selected conversion, its result is previewed in the editing window, so the user can cancel the conversion if the quality degradation is too perceptible.
ObjectLand proposes the following optimization methods:
Reducing size of the raster array by decreasing the image resolution, i.e. increasing its granularity. The decreasing factor is entered in the adjacent field. This factor shows how many times the number of pixels of the source raster will be reduced. For example, if the factor is set to 4, then both width and height of the array will be reduced 2 times, thus the total number of points will be reduced 4 times.
One shouldn't be afraid that reducing of the stored raster will necessary lead to the visual decreasing of the feature when it will be displayed in the theme. In fact, the raster georegistration is to be corrected in such a way that, for example, corners of the reduced raster rectangle will be bound to the same map coordinates as the corners of the source rectangle before its reducing were.
Conversion to N-bit format (N can be 24, 16, 8, 4 or 1). In this case the size of raster data will be reduced proportionally. For instance, if 24-bit raster is converted to 8-bit one, the data size will be reduced 3 times.
Formats with N = 24, 16 or 8 permit to retain color picture, and degradation of color rendering is non-appreciable in most cases. When N = 4, the image is converted in 16 grayscale gradations, and when N = 1, the image is converted to a monochrome black-and-white raster, and the user can set the brightness threshold dividing black areas from white ones.
Image posterization. This term means that the raster is, firstly, converted to 8-bit format, and, secondly, the number of used colors is reduced to a given value (from 1 to 255) by replacing similar color gradations by one color. Posterization makes sense only in combination with image compression and it allows to get a better compression ratio in comparison with a non-posterized raster.
The system permits to choose from the list only those methods which would result in reducing data size as compared with the source format. For instance, 8-bit raster can be converted to 4-bit or monochrome, but an attempt to choose N = 24, 16 or 8 will cause a message in the pane: “Method is unapplicable”.
To execute the selected conversion one should push the button Perform. If the conversion result does not suit the user, he or she can cancel it by pushing the button Initial image. However, the following should be taken into consideration:
The button Initial image is active only when editing an image feature which is already stored in the map. In the case of adding a new feature the repeated input of the raster from a file can be used instead of this button.
After the feature editing is done and the editing window is closed, canceling the raster conversion becomes impossible. In this case it is also possible to re-input the raster from a file.