Hello there Andrea

Sent the patch (http://jira.codehaus.org/browse/GEOT-2429).

Please review it since I ended up needing to a small change in Decimator 
as well. Its decimate() method does nothing if spanx==-1, but I needed 
to change its decimateTransformGeneralize() method (which is the one 
being called in practice) to do the same: it was still generalizing "to 
the screen" anyways.
A stupid alternative was to have getDecimator() return null, which 
surprisingly works as things are because LiteShape2 ignores the 
decimator if it is null. But I thought this alternative was a little 
shaky, so I figured changing Decimator to act consistently was better.

Cheers
Milton

Andrea Aime wrote:
> Milton Jonathan ha scritto:
>> Well, ok then.
>>
>> Here are then my notes on the two different workarounds to control 
>> decimation as things stand:
>>
>> 1. Switching to StreamingRenderer when you don't want decimation. 
>> StreamingRenderer uses in-memory Decimators and already has a nice 
>> setGeneralizationDistance() method which could be used to eliminate 
>> decimation. Too bad it doesn't respect it, but that would be easy to 
>> change: I guess getDecimator() could just check the distance and if 
>> appropriate return a Decimator with spanx=spany=-1, which does nothing.
>>
>> 2. Multiplying the screen area by a large number, and at the same time 
>> setting an appropriate scale to the Graphics before calling 
>> renderer.paint(). This works with any renderer but doesn't absolutely 
>> guarantee decimation. Moreover, it has a little side effect because it 
>> visually affects the stroke: this happens since the stroke is given in 
>> screen units, which in this case represent a lot less (given that we 
>> artificially increased the resolution by scaling the screen area)
>>
>> Well, I guess I'd prefer to use solution 1 since performance is not 
>> critical when exporting to an SVG. If you're ok with that change I 
>> proposed to StreamingRenderer, I could do it and send you a patch. 
>> What do you think?
> 
> Eagerly waiting for the patch :)
> Cheers
> Andrea
> 

-- 

Milton Jonathan
Grupo GIS e Meio Ambiente
Tecgraf/PUC-Rio
Tel: +55-21-3527-2502

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to