FW: [UMN_MAPSERVER-DEV] specific raster queries

Frank Warmerdam warmerdam at POBOX.COM
Tue Apr 11 14:36:27 EDT 2006


Erick Ferreira wrote:
> Frank,
> 
> I have done some tests by mesuring the time in three points inside
> msRasterQueryByRectLow(): - in the begining of the scope (A), - just before
> the comment "Loop over all pixels determining which are in" (B) - and in
> the end of the scope (C).
> 
> I did not come with too many samples but I found that the time spent
> between A and B was allways comparable (or even greater) to the time spent
> between B and C.

Erick,

OK, this is good information to know.

> So I thought of some possible implementation of a rasterQueryByPath()
> function in that basis, but that would _probably_ mean that a
> specialization in GDAL would be necessary as well.

Well, for many formats there won't be much that can be done to optimize
the data access.  The cost of loading the data for a diagonal line is
essentially the cost of loading all the touched horizontal scanlines
completely.  Loading partial scanlines is often not appreciatably
cheaper than loading the whole line.

For tiled datasets there would be a substantial benefit to only loading
the required tiles.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org



More information about the mapserver-dev mailing list