Rendering of rotated tiled coverages
------------------------------------

                 Key: GEOT-1617
                 URL: http://jira.codehaus.org/browse/GEOT-1617
             Project: GeoTools
          Issue Type: Improvement
          Components: core render
         Environment: windows, solaris, 64MB heap size, any big enough image 
with world file with nonzero second and third line
            Reporter: Jaroslav Kubos
            Assignee: Jesse Eichar


Hi all. We are trying to render huge (21000x21000px) GeoTiff which is 
internally tiled and contain overviews. It is created from image and worldfile 
by GDAL. When it is not rotated ("rotation term" field for row and column in 
worldfile) everything works fine, memory consumption is small. But in case it 
is rotated, rendering takes big amount of memory. I debugged it and the problem 
is in "GridCoverageRenderer" in method "paint":

Because image is rotated this condition will pass
-- if(!isScaleTranslate(gridCoverage.getGridGeometry().getGridToCRS())) {

then because we render in one CRS this condition will not pass
-- if (doReprojection) {
 
then is called
-- graphics.drawRenderedImage(finalImage, clonedFinalWorldToGrid);

which will fail on "Java heap space OutOfMemory Error". Because (Java 
documentation): 
-- Renders a RenderedImage, applying a transform from image space into user 
space before drawing. 

So one possible solution is to use gdalwarp utility to remove rotation from 
image. That is how we work now.

Second possibility is to improve geotools way of rendering tiled rotated 
coverages. The improvement could be to render each tile inside rendering bbox 
separately. It will be probably quite slow but better than exception.

If you want I think I am able to implement this feature. Though some hints 
about classes/methods I should use could be helpful.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to