Hi, 

uDig uses Streaming renderer in the way that David has outlined, are you sure that the performance you are talking about was when connected to a PostGIS?  Because uDig uses a different and optimized renderer for shapefiles which is dramatically faster than streaming renderer (exactly because it is optimized for shapefiles).  

Jesse
On 10-May-06, at 3:20 PM, Mauricio Mantilla wrote:

Thank you David,
I did what you told me and it improved a bit, but it's still far from uDig rendering speed

Any other suggestions?

Mauricio Mantilla

On 5/10/06, David Blasby <[EMAIL PROTECTED]> wrote:
Mauricio Mantilla wrote:

> Hi all,
> I created a mapviewer using StreamingRenderer and data from a Postgis
> database.
> I based my code for the rendering on this example:
> http://www.geotools.org/display/GEOTOOLS/How+to+create+a+custom+MapLayer+--+jdk+1.5+geotools+2.1.M4
>
>
> When I run the project and everytime I zoom or pan it takes too long to
> render the map. I also have uDig and I noticed it takes almost no time to
> render the same data. I think uDig also uses StreamingRenderer.
>
> How can I improve the rendering speed to make more like uDig??
>
> Thanks



I havent looked at what you're doing, but the common mistakes are:

1. you have to set a few params in the datastore:

        param.put("wkb enabled","true");
         param.put("loose bbox","true");

2. you have to set this for the renderer:

        Map rendererParams = new HashMap();
        rendererParams.put("optimizedDataLoadingEnabled",new
Boolean(true) );

        renderer.setRendererHints(rendererParams);


dave


Reply via email to