[Gdal-dev] Why small image cost more time in mapserver's warping
Frank Warmerdam
warmerdam at pobox.com
Tue Oct 26 09:22:44 EDT 2004
Fu Chen wrote:
> Hi!
> I operate on some landsat7's images and try to warp them to another projection
> dynamicly in mapserver. The image already have several level overviews. But I
> find it very weird that if i zoom it out to be a very small thumbtail like image,
> it still cost a lot of time to warp. On the other hand, if i zoom in inside the
> image, it responds very quickly cost much less than the thumbtail one.
> I am not clear about the reason inside. Can anybody give me an hint?
> Thank you!
Fu Chen,
You didn't make clear how many levels of overviews exist. Generally speaking
the warper will try and load the required region at double the resolution that
will be needed for the rendering though never loading at more than 1:1. If
there are no image overviews pre-built, loading a small overview of a big file
can be very expensive but it seems that this should not be the case for your
file if you have a good set of overviews built and being used.
You can turn on layer level debugging to see a bit of information about
what is happening when a warped layer is rendered. It should produce output
something like:
msResampleGDALToMap in effect: cellsize = 10.000000
msDrawGDAL(grey): using RAW_WINDOW=0 0 40 30
If you really want to dig into it, then dump out information about sDummyMap
(extents and size) and the srcImage near the msDrawRasterLayerGDAL() call in
mapresample.c. It is possible too much imagery is being forcable loaded.
If you aren't in a position to dig through the code yourself, you can prepare
a case that demonstrates the slowness and submit it as a bug report. I would
need a shp2img or mapserv invocation that demonstrates the problem as well
as a minimal map and set of data files to execute it. Don't submit large
data files into bugzilla though ... just put them somewhere I can download
them and record the location in bugzilla.
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 | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list