I see that a placeholder is already there for reprojection.... org.gvsig.raster.datastruct.ViewPortData.reProject(ICoordTrans rp), and looking to the raster rendering workflow, the idea of a reprojector could be incorporated without breaking anything. I hope to find some time to work on it.<div>
<br></div><div>Giovanni<br><div><div><br><br><div class="gmail_quote">2011/6/1 G. Allegri <span dir="ltr">&lt;<a href="mailto:giohappy@gmail.com">giohappy@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I&#39;ve seen that on-the-fly raster reprojection isn&#39;t available yet. The only solution, meanwhile, is doing a reprojection (wether during file loading or as a distinct process) which is performed with a call to gdal warp (though JNI calls from WarpFunction, right?). <div>

This process can be ok for &quot;offline&quot; transformations, but become unfeasable for on the fly uses, unless a very small grid is beaing loaded. </div><div>This is not Gvsig fault, it&#39;s the gdal reprojection code that has to do a lot of work, even if an approximate reprojection is requested (error threshold being &gt; 0.0, the default in Gvsig).</div>

<div><br></div><div>A better solution could be to implement something like the Qgis RasterReprojector [1], which is created and used during the read od the grid datas, without affecting the providers code.</div><div>The raster projector implements a fast, approximated reprojections, which can be ok for viewing the raster. An option coul be given to do a precise reprojection in case raster processing need the original precision.</div>

<div><br></div><div>A hint for the gdalwarp reprojection: why don&#39;t let the user enter custom projections in the Reproject dialog? We could make a check to validate its syntax against the one accepted by gdal, or simply manage the exception in case the projection is not valid...</div>

<div><br></div><div>Giovanni</div><div><br></div><div><br></div><div>[1] <a href="http://trac.osgeo.org/qgis/browser/trunk/qgis/src/core/qgsrasterprojector.cpp" target="_blank">http://trac.osgeo.org/qgis/browser/trunk/qgis/src/core/qgsrasterprojector.cpp</a></div>

</blockquote></div><br></div></div></div>