Ciao Diego,
quick explanation given:

If you give the reader to the renderer the latter tries to load a
suitable coverage each time yu zoom and/or pan in order to make things
much faster. Before you were requesting the whole coverage at its
maximum res and you were zooming/panning using that all the time. This
would have meant resampleing/translating the highest res coverage all
the time, which is a amemory consuming task if the coverage is pretty
big as yours is.


Ciao,
Simone.

On Dec 11, 2007 6:16 PM, Diego Fdez. Durán <[EMAIL PROTECTED]> wrote:
> I need a little explanation :)
>
>   When you say:
>
> > 2>
> > In your code you are providing the traight coverage to the map pane.
> > To gain access to decimation on reading and/or overviews you need to
> > provide the map pane with the reader directly not with the coverage.
> > The renderer wil then ask the reader to supply the best resolutio
> > navailable exploiting overviews/decimation
>
>   Now I'm doing this:
>
>         [...]
>         AbstractGridCoverage2DReader reader;
>         try {
>             reader = new ImageMosaicReader(file, new
> Hints(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.TRUE));
>         } catch (IOException ex) {
>             ex.printStackTrace();
>             return;
>         }
>
>         crs = coverage.getCoordinateReferenceSystem();
>
>         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);
>         [...]
>
>  I don't understand when you say:
>
> > To gain access to decimation on reading and/or overviews you need to
> > provide the map pane with the reader directly not with the coverage.
>
>  I thought than I was doing it already.
>
>  Thanks!
>
> --
> Diego Fdez. Durán <[EMAIL PROTECTED]> | http://www.goedi.net
> GPG : 925C 9A21 7A11 3B13 6E43 50DB F579 D119 90D2 66BB
>
>
> -------------------------------------------------------------------------
> 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
>



-- 
-------------------------------------------------------
Eng. Simone Giannecchini
President /CEO GeoSolutions S.A.S.
Via Carignoni 51
55041  Camaiore (LU)
Italy

phone: +39 0584983027
fax:      +39 0584983027
mob:    +39 333 8128928


http://www.geo-solutions.it

-------------------------------------------------------

-------------------------------------------------------------------------
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