Imagine a GIS application with the longitude/latitude as coordinate system. You have bought elevation data with a resolution of 100x100 m for your country and data with a higher resolution ( 10x10 m ) for your hometown.
The user of the GIS application navigates across the whole world - also to places, where you don't have any values. So the elevation data object needs to tell the plot widget about the area, where it has values: QwtRasterData::boundingRect().
Your elevation data is by far too much to load it in memory at once. So the raster data object needs to know the area, that is currently displayed in the plot widget to build its raster in memory. That's what QwtRasterData::initRaster/discardRaster is about.
The image, that is rendered from the elevation data is also a raster - but one with different pixel positions and sizes ( depending on the size of the plot widget and the area, that is currently displayed ) Mapping raster data from one resolution into another is called resampling. The most easiest way of resampling is next neighbor ( using the value of the closest point in the source raster ), but f.e. you could also use the average value of the 4 neighbored points.
It doesn't make sense to render an image in a higher resolution, than the elevation data can offer values. To avoid this the raster data object can recommend a resolution for a specific area with QwtRasterData::rasterHint. Think about printing your scene to a A0 plotter with 1200dpi and you will understand why this optimization might be important.
Uwe
Bookmarks