Raster Loader is a purpose built raster data loader. It translates existing BMP/ECW/GIF/JPG/JP2/PNG or TIF imagery into a specific set of files (Raster Pyramid) that Earthlight uses.
In order to provide the best possible performance Earthlight does not store raster imagery in the database. Instead the images are stored on the HDD. However storing the images in their original format and using these for Earthlight purposes would be impossible. An average tile of aerial photography is about 20MB in size and 4000 x 4000 pixels in dimensions.
This is where Raster Loader comes into play.
Raster Loader splits the original images into tiles of 512 x 512 pixels. These are far smaller and easier to handle. 512 x 512 was chosen for 2 reasons:
- on a typical monitor screen we need on average 4 tiles to display the image
- 512 is a power of 2 and as we all know computers like the power of 2
That is just the first step. After the initial split Raster Loader starts to create what we call Raster Pyramid. Raster Pyramid is a layered stack of sets of tiles where every +1 level the 512 x 512 pixel tile has 4 times bigger coverage. Lets say that on the 1st level each tile was covering 1km x 1km area. On the 2nd level the 512 x 512 tile will cover 2km x 2km area.
When zooming out of the map, the fine details of the original imagery are lost due to the screen pixel density. You cannot show four distinctive pixels of the image if they all occupy a single pixel on the screen. Assuming that you zoomed out 1 step from the original level where 4 tiles were needed we would have to fetch 16 original tiles to make up the new image and only 1/4 of the data would be displayed anyway. It makes sense to merge and resize the original tiles so that at this level we still need only 4 tiles. And Raster Loader does this merge and resize procedure until on the very top of the pyramid the whole raster imagery fits on a single tile.
This process ensures that whatever the scale on the map you are viewing the raster image, Earthlight only has to read as much data from the HDD as is absolutely necessary to provide you with an image. Since Raster Loader is a part of Earthlight GIS system, we made sure that the scales on which the pyramid levels are created, are matched by the predefined scales used by Earthlight (1:512, 1:1024, 1:2048, etc.). Therefore there is no need for an on-the-fly low-quality rescaling and the end user always gets the best quality imagery with a minimal server load.