I don't know if this questions are addressed to me but...

Now I'm doing this[1], passing the reader directly to the
StreamingRenderer. I don't know how StreamingRenderer works internally.
I could download the StreamingRenderer from the SVN and take a look if
you want (but the original dev probably knows better than me how to
improve the renderer). I need to get the optimal performance and I'll be
glad if I can help in the improvement of GeoTools in the process.

Thanks.


[1]
-- start code
       
        AbstractGridCoverage2DReader reader;
        try {
            reader = new ImageMosaicReader(file, new
Hints(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.TRUE));
        } catch (IOException ex) {
            ex.printStackTrace();
            return;
        }

        GridCoverage2D coverage;
        try {
            coverage = (GridCoverage2D) reader.read(null);
        } catch (IOException ex) {
            ex.printStackTrace();
            return;
        }

        crs = coverage.getCoordinateReferenceSystem();
        RenderedImage image = coverage.getRenderedImage();

        StyleBuilder styleBuilder = new StyleBuilder();

        ColorMap cm = styleBuilder.createColorMap(
                new String[]{"0", "255"},
                new double[]{0, 255},
                new Color[]{ new Color(0, 0, 0),
                             new Color(255, 255, 255)},
                ColorMap.TYPE_RAMP);                    // XXX: ?


        RasterSymbolizer rs = styleBuilder.createRasterSymbolizer(cm,
1);
        Style st = styleBuilder.createStyle(rs);

        mapContext = new DefaultMapContext(crs);
        mapContext.addLayer(reader, st);
        renderer.setContext(mapContext);

-- end code

On mar, 2007-12-11 at 11:29 -0800, Jody Garnett wrote:
> I will enter in here with a couple of (probably stupid observations)....
> 
> DisplayJAI is going to be using a Volatile image from the graphics card 
> as the end of its processing chain is it not? That means that whole 
> sections of the chain should be processed on the graphics card ...
> Are you calling StreamingRenderer with a Volatile image? Or onto a 
> BufferedImage? We have seen a difference in speed performing these kinds 
> of tricks in uDig...
> 
> Jody
> 
> > Hi:
> >
> >  Now I'm using the JPEG compressed GeoTiff files. I've get a performance
> > boost but the DisplayJAI still has more speed rendering the raster.
> >
> >  Are there any way to get the DisplayJAI rendering speed using the
> > StreamingRenderer?
> >
> >  I apologize for being so insistent but in my app the navigation speed
> > through the map is critical.
> >
> >   
> 
-- 
Diego Fdez. Durán <[EMAIL PROTECTED]> | http://www.goedi.net
GPG : 925C 9A21 7A11 3B13 6E43 50DB F579 D119 90D2 66BB

Attachment: signature.asc
Description: Esta parte del mensaje está firmada digitalmente

-------------------------------------------------------------------------
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-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to