Frank, <br> The source images are a sequence of tiles from openstreetmaps. Every tiles has a fixed size (256 x 256) and the area they covers depends from the zoom level.<br>It is explained very well in<br><a href="http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection">http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection</a>.<br>
<br>I use interpolation (via a virtual dataset) because my window size and the paper size are not a multiple of 256 x 256.<br>I use reprojection because I've to mix this raster datasource with a vector datasource that has a different projection. Reprojecting my vector data to openstreet projection do not affect the performance.<br>
<br>So I think the key factor is the resizing ( I use "bilinear" interpolation) and the size of the bitmap that may cause paging.<br><br>I use the following : <br><br>hWarp := GDALAutoCreateWarpedVRT (hSized,<br>
<div id=":v3" class="ii gt"> nil,<br> PChar(FMapSRSWkt),<br>
GDALResampleAlg_GRA_NearestNeighbour,<br> 0.5,<br> nil);<br><br>where hSized is a <br><br>hSized = F (hDataset) ;<br>
<br>F (hDataset) := Virtual Dataset of hDataset. I use it for in memory resizing .<br>It is generated by: (I do not write all the details but I think it is clear)<br> <br><br>VRTAddSimpleSource (poVRTBand,<br> poSrcBand,<br>
Round(anSrcWin[0]),<br> Round(anSrcWin[1]),<br> Round(anSrcWin[2]),<br> Round(anSrcWin[3]),<br> 0, 0,<br>
<a href="http://size.cx/" target="_blank">size.cx</a>,<br> <a href="http://size.cy/" target="_blank">size.cy</a>,'Bilinear', 0.0 );<br><br><br>and hDataset = GDALOpen( ... "openstreet.xml" )</div>
<br>Can you suggest some other parameters?<br><br><br>Thanks,<br>Stefano<br><br><br><br><br><div class="gmail_quote">On Thu, Jun 10, 2010 at 4:53 PM, Frank Warmerdam <span dir="ltr"><<a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">Stefano Moratto wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The performances are quite acceptable but when I try to print they are not.<br>
<br>
The drawing to be printed has a resolution larger of the screen (Screen : 1024x1024, Printer 4096 x 4094 in A4 and 9000 x 9000 in A3 approximately).<br>
I think tha the bottleneck could be found in:<br>
1) jpeg decompression.<br>
2) bitmap interpolation (I use the low qualitiy settings).<br>
3) warping ( I use an approsimated warping function).<br>
<br>
An increase of performance could be achieved using<br>
1) hw accelerated functions as IPP or GPU (e.g CUDA)<br>
2) parallel alghorithms that takes advantage from multicore CPU<br>
<br>
Has someone already approched these problems?<br>
</blockquote>
<br></div>
Stefano,<br>
<br>
Are the same number of jpeg tiles being used when producing print products<br>
as on screen? I'm assuming the answer is yes, and that the warper is just<br>
interpolating a higher resolution result from them.<br>
<br>
If the answer is yes, then presumably the time decoding the jpegs would<br>
not be greater for the prints than for screen display, though it is<br>
possible that more re-reading is occuring. If re-reading is an issue<br>
you might want to increase the size of the GDAL block cache. Programmatically<br>
this can be done with the C function GDALSetCacheMax(). Try setting it to 100<br>
(for 100MB).<br>
<br>
Are you using the warper just to interpolate to different sizes or are<br>
you also applying reprojection or some other non-linear warping? If you<br>
are just using it to resize the image then I would suggest using something<br>
less general-purpose than the warper to do the interpolation.<br>
<br>
Seth's CUDA work may also be of interest of course, but before committing<br>
to that path I would suggest some analysis of where the time is really being<br>
spent.<br>
<br>
Best regards,<br><font color="#888888">
-- <br>
---------------------------------------+--------------------------------------<br>
I set the clouds in motion - turn up | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com" target="_blank">warmerdam@pobox.com</a><br>
light and sound - activate the windows | <a href="http://pobox.com/%7Ewarmerdam" target="_blank">http://pobox.com/~warmerdam</a><br>
and watch the world go round - Rush | Geospatial Programmer for Rent<br>
<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Dr.Eng. Stefano Moratto<br><a href="mailto:stefano.moratto@gmail.com">stefano.moratto@gmail.com</a><br><a href="mailto:stefano.moratto@csiat.it">stefano.moratto@csiat.it</a><br>
<a href="http://www.csiat.it">http://www.csiat.it</a> - Traffic Optimization Software<br>