On Mon, Feb 18, 2013 at 6:50 PM, Ákos Maróy <[email protected]> wrote:

> Hi,
>
> I wonder what is the main reason behind increased memory requirements
> for the geotools renderer, when the very same data is being rendered,
> but at different DPI values / different target bitmap sizes?
>
> the bitmap itself is a DiskMemImage (not a BufferedImage), thus the
> memory footprint of such a bitmap does not increase with size.
>
> but then, what could be the cause of this?
>
>
I know of two reasons.

If you have multiple FeatureTypeStyle object in your SLD Style, commonly
used to get highway style road symbols, or generally speaking for force
a particualr Z order in symbology, a BufferedImage will be allocated for
each of the FTS besides the first one, so that feature can be read just once
and painted over the different buffers as we go, the buffers are then merged
to create a single image with the desired z-order
This can be deactivated, there is a rendering hint to do so (don't remember
it by heart).

The second one is the label cache: the labels are accumulated during
rendering into
an in memory data structure, and then painted when all of the other
rendering
is done, on top of the existing map.

For the latter it would be possible to write a label cache that paints on a
separate
buffered image without accumulating labels, assuming there is no

In both cases it might make sense to have those classes allow a subclass to
override the generation of the extra back buffers (BufferedImage today) so
that a disk mem image can be used instead

Cheers
Andrea

-- 
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, 
is your hub for all things parallel software development, from weekly thought 
leadership blogs to news, videos, case studies, tutorials, tech docs, 
whitepapers, evaluation guides, and opinion stories. Check out the most 
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to