|
From: Michael B. <mic...@gm...> - 2013-01-16 01:42:45
|
Hi Akos, Andrea, Jody and others here are rendering gurus and I hope they will follow with more expert advice, but I'll get the ball rolling... If the destination image fits into available memory then yes, simply create a Graphics2D instance from the image and pass that to the renderer. If the destination image is way too big for available memory you might have a look at the JAITools DiskMemImage class. This is a tiled image class that caches tiles both in memory and in temporary files on disk. http://jaitools.org/docs/jaitools/stable/apidocs/org/jaitools/tiledimage/DiskMemImage.html You can tune the volume of image data that is stored in memory vs on disk to reduce disk i/o time. However, it will still be a great deal slower than having the entire image in memory. Michael On 16 January 2013 07:35, Ákos Maróy <ak...@ma...> wrote: > Hi, > > I'd like to create considerably large bitmaps by rendering SLD-styled > layers using the geotools API. The rendering part looks straightforward, > with a DataSource, Style created via SLDParser, StreamingRenderer, > FeatureLayer, MapContent, etc. objects. But, it seems that creating > large bitmaps using Java is not that simple. Moreover, I see that quite > some work has already been done in the geotools library to this extent. > > Still, looking at the documentation, it's not straightforward for me > which way to go. > > If I already have a MapContent object, with appropriate FeatureLayer > objects in it, what would be the intended / suggested way to render it > into big bitmaps. Should one simple create a TiledImage, get the > Graphics2D object via TiledImage.createGraphics(), and use the > StreamingRenderer to render into this Graphics2D object? Or is there a > better / more advised way of doing this? > > by big, I mean for example rendering an area of about 550km x 350km at a > scale of 1:500.000, with 600dpi or more - that is images of about 26.000 > x 16.000 pixels or more. > > Best regards, > > > Akos > > > ------------------------------------------------------------------------------ > Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS > and more. Get SQL Server skills now (including 2012) with LearnDevNow - > 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts. > SALE $99.99 this month only - learn more at: > http://p.sf.net/sfu/learnmore_122512 > _______________________________________________ > GeoTools-GT2-Users mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users |