[Geotools-gt2-users] DisplayJAI vs. GTRenderer.paint performance

2007-12-11 Thread Diego Fdez . Durán
Hi all: I'm using ImageMosaic to load a GeoTiff index shapefile (9 GeoTiffs, total size of 146889x92337). If I display the resulting map using DisplayJAI I get an optimal performance but I need to use StreamingRenderer.render method to display multiple layers above the raster image. With

Re: [Geotools-gt2-users] DisplayJAI vs. GTRenderer.paint performance

2007-12-11 Thread Jody Garnett
You may want to open a bug report for this one; the module maintainer for raster stuff is usually faster to respond to Jira issues than to email. Jody Hi all: I'm using ImageMosaic to load a GeoTiff index shapefile (9 GeoTiffs, total size of 146889x92337). If I display the resulting map

Re: [Geotools-gt2-users] DisplayJAI vs. GTRenderer.paint performance

2007-12-11 Thread Simone Giannecchini
Ciao Diego, a few remarks. 1 It seems that you geotiff files are pretty big. If you really want to see very good performances I would add overviews to them. Try also to compress them before doing so, this way loading wil be much faster (for rgb I usually use JPEG compression). This can be easily

Re: [Geotools-gt2-users] DisplayJAI vs. GTRenderer.paint performance

2007-12-11 Thread Diego Fdez . Durán
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

Re: [Geotools-gt2-users] DisplayJAI vs. GTRenderer.paint performance

2007-12-11 Thread Simone Giannecchini
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

Re: [Geotools-gt2-users] DisplayJAI vs. GTRenderer.paint performance

2007-12-11 Thread Diego Fdez . Durán
Hi Simone: I'm understanding that you're saying that my poor performance is because I do: coverage = (GridCoverage2D) reader.read(null); before doing: mapContext = new DefaultMapContext(crs); mapContext.addLayer(reader, st); renderer.setContext(mapContext);

Re: [Geotools-gt2-users] DisplayJAI vs. GTRenderer.paint performance

2007-12-11 Thread Simone Giannecchini
Ops, sorry Diego, I did not read your code carefully enough. If you were providing the map pane with the reader you were already doing the right thing. So we have to go back to the other suggestions I gave you, that basically meant preprocess you data to have good performances. Can you do a

Re: [Geotools-gt2-users] DisplayJAI vs. GTRenderer.paint performance

2007-12-11 Thread Diego Fdez . Durán
There are 9 like this with and index shapefile and a properties file. [EMAIL PROTECTED]:/var/lib/maps/Sur$ ls -lh Sur2_A1.tif -rwxrw-r-- 1 nobody maps 868M Dec 10 18:07 Sur2_A1.tif -- gdalinfo information follows: Driver: GTiff/GeoTIFF Size is 48963, 30779 Coordinate System is: PROJCS[ED50 / UTM

Re: [Geotools-gt2-users] DisplayJAI vs. GTRenderer.paint performance

2007-12-11 Thread Diego Fdez . Durán
The image is 8bit palette (packbits/LZW compressed) (image optimized palette) exported using GlobalMapper. I'll process the images as you say and make a test. On Tue, December 11, 2007 18:09, Simone Giannecchini wrote: Diego, you need to add overviews to these files since they are pretty big.

Re: [Geotools-gt2-users] DisplayJAI vs. GTRenderer.paint performance

2007-12-11 Thread Diego Fdez . Durán
If I do: gdal_translate -co TILED=YES -co BLOCKYSIZE=512 -co BLOCKXSIZE=512 -co COMPRESS=JPEG Sur2_A1.tif Sur2_A1.procesado.tif I get thousands of: ERROR 1: JPEGSetupEncode:PhotometricInterpretation 3 not allowed for JPEG and a 50KB .tif from a 869MB .tif. My images aren't in the right

Re: [Geotools-gt2-users] DisplayJAI vs. GTRenderer.paint performance

2007-12-11 Thread Simone Giannecchini
Are you using fwtools ? If so which version? Simone. On Dec 11, 2007 7:37 PM, Diego Fdez. Durán [EMAIL PROTECTED] wrote: If I do: gdal_translate -co TILED=YES -co BLOCKYSIZE=512 -co BLOCKXSIZE=512 -co COMPRESS=JPEG Sur2_A1.tif Sur2_A1.procesado.tif I get thousands of: ERROR 1:

Re: [Geotools-gt2-users] DisplayJAI vs. GTRenderer.paint performance

2007-12-11 Thread Simone Giannecchini
add this option to your command -co PHOTOMETRIC=RGB Simone. On Dec 11, 2007 7:39 PM, Simone Giannecchini [EMAIL PROTECTED] wrote: Are you using fwtools ? If so which version? Simone. On Dec 11, 2007 7:37 PM, Diego Fdez. Durán [EMAIL PROTECTED] wrote: If I do: gdal_translate -co

Re: [Geotools-gt2-users] DisplayJAI vs. GTRenderer.paint performance

2007-12-11 Thread Diego Fdez . Durán
It works! The translation I mean :) Requested information: [EMAIL PROTECTED]:~$ gdal_translate --version GDAL 1.4.3.0, released 2007/10/28 I'll do the test when the translation finish. THANKS! On Tue, December 11, 2007 18:41, Simone Giannecchini wrote: add this option to your command

Re: [Geotools-gt2-users] DisplayJAI vs. GTRenderer.paint performance

2007-12-11 Thread Diego Fdez . Durán
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

Re: [Geotools-gt2-users] DisplayJAI vs. GTRenderer.paint performance

2007-12-11 Thread Jody Garnett
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

Re: [Geotools-gt2-users] DisplayJAI vs. GTRenderer.paint performance

2007-12-11 Thread Diego Fdez.
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

Re: [Geotools-gt2-users] DisplayJAI vs. GTRenderer.paint performance

2007-12-11 Thread Jody Garnett
Diego Fdez. Durán wrote: 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

Re: [Geotools-gt2-users] DisplayJAI vs. GTRenderer.paint performance

2007-12-11 Thread Diego Fdez.
I append the full source code[1] but the painting part is: private class PanelMap extends JPanel { @Override public void paint(Graphics g) { try { Graphics2D g2d = (Graphics2D) g; Rectangle rectangle = new Rectangle(getSize());

[Geotools-gt2-users] DisplayJAI vs Rendering to BufferedImage JPanel

2007-12-11 Thread Jody Garnett
Okay; so JPanel does double buffering by default (so your paint method is being passed a Graphics object that is backed onto a BuferedImage - check it out in a debugger). Needless to say this is not what you want for performance... Have a read of this: -

Re: [Geotools-gt2-users] DisplayJAI vs Rendering to BufferedImage JPanel

2007-12-11 Thread Diego Fdez.
I've followed you all down the garden path :) and it appears to be the right path. I've rewritten the PanelMap code using VolatileImage[1] but I can't test it with the big map until tomorrow morning, then I'll send a report :) P.S.- When I was doing a test with the big map in a single GeoTiff