[geotk] Redraw layer

Arnaud Vandecasteele arnaud.sig at gmail.com
Tue Dec 13 09:18:35 EST 2011


Hi Johann,

Thank you very much for this very complete answer.
I will look at the different tips you gave me.

Best regards.

Arnaud

On Sun, Dec 11, 2011 at 5:12 PM, sorel johann <johann.sorel at geomatys.fr> wrote:
> Hi,
>
> It's more complicated. internally there are several image created.
> and they are progressively merged together when each one is ready.
> The labels are painted at the end over everything.
> Repainting a layer would imply repainting the label 'calque' too (assuming
> all labels texts and position have been stored, which is not the case).
>
> Some layer use caches like wms and other tiled source layers, those layers
> will only requiere a very very short time to repaint.
>
> At this time you can create two types of canvas, statefull and stateless.
> (when you create a J2DCanvas) the main different are in caches, the
> statefull
> mode will try to cache more datas and stateless won't keep anything and will
> only use
> a single image to paint which makes it a bit slower but requiere less
> memory.
>
> It is possible to make another mode and have each layer in separate images,
> if you want to try to make it you can start by looking at the J2DCanvas.
>
>
> I don't know if you are in swing or something else, another approach is to
> use the
> DefaultPortrayalService do generate one image for each layer and then
> reaggregate them
> the way you wish.
>
> johann
>
>
>
>
> On 11/12/2011 14:31, Arnaud Vandecasteele wrote:
>>
>> Hi all,
>>
>> I would like to know if it's possible to repaint a specific layer.
>> I know there is a getCanvas().repaint() method but it applies to all
>> layers.
>>
>> Also, can you let me know how geotoolkit works to draw the image.
>> Is it a global image for all the map (all the layers) or differents
>> images for each layers.
>>
>> Best regards
>>
>> Arnaud
>>
>>
>> --
>> _______________________________________________
>> Geotoolkit mailing list
>> Geotoolkit at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/geotoolkit
>
>
> _______________________________________________
> Geotoolkit mailing list
> Geotoolkit at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geotoolkit



-- 
--------------------------------------------------------------------
Arnaud Van De Casteele
Mines Paris Tech - CRC
Sophia-Antipolis
0698 24 25 29
SIG - WebMapping - SOLAP - BI - GeoCollaboration

Web Site
http://geotribu.net/
http://www.i2c.eu/


More information about the Geotoolkit mailing list