Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Change the style

Hi Jody,

I am not allowed to send direct screenshots, so i should first create
custom application etc.. and i am a bit too
lazy for that. =)

instead i found the reason or at least part of it, the
StreamingRenderer uses labelCache
(org.geotools.renderer.label.LabelCacheImpl),
and it's buildLabelCacheItem(... method uses
SLDStyleFactory.createStyle(feature, symbolizer, scaleRange) method,
which caches at least in my case the symbolizer styles to
SLDStyleFactory.staticSymbolizer member, and the cache
key SymbolizerKey hashCode&equals does not calculate/compare
Symbolizer properties, like size changes, so original
style is always returned.
Setting SymbolizerKey.equal to return always false fixes the problem,
but i think it is not real fix, and i am not sure where
equals is called i think HashMap should use hashCode..
But if you want and need screenshots and bug reports i can do it at evening.

- Artsi

2009/8/17 Jody Garnett <jody.garnett@xxxxxxxxx>:
> That is interesting; there are a couple of places where styles are cached
> during the rendering process; but I thought they only ever where chased for
> the length of drawing a single image. Can you create a bug report with
> screen snaps showing the problem; and steps used etc...
>
> If you want to look at the code the BasicFeatureRenderer implementation is
> what holds on to a geotools renderer when rendering features...
>
> Also indicate it you are getting this problem with shapefiles, databases, or
> wfs data sources?
>
> Jody
>
> On 17/08/2009, at 4:27 PM, Arto Pastinen wrote:
>
>> Ah nice.. =)
>>
>> Ok, my explanation was little difficult, what i meant with scale is
>> the scale denominator, the zoom.
>> What did happend is i change the size of the textsymbolizer and
>> graphic etc. but it doesnt change in the map,
>> but when i zoom out or in, in new image they have changed, but if i
>> zoom back to level before, there is again this
>> old style sizes, its like there is some kind cache or something..
>>
>> - Artsi
>>
>>
>> 2009/8/16 Jody Garnett <jody.garnett@xxxxxxxxx>:
>>>
>>> Hi - that is cool. There was a visitor already implemented for that in
>>> geotools and documented here:
>>> -
>>>
>>> http://docs.codehaus.org/display/GEOTDOC/08+StyleVisitor+use+with+DuplicatingStyleVisitor+and+RescaleStyleVisitor
>>>
>>> This is the visitor we use to resize styles when printing to high DPI
>>> output
>>> like printers; we also changed the linestring width I think...
>>>
>>> To change scale or projection please adjust the viewport model.
>>>
>>> Perhaps I am not understanding what scale you are trying to change? Style
>>> does not have a scale or projection ... there is a minScale / maxScale in
>>> Rule (but that is used to turn off your style when it is at the wrong
>>> zoom
>>> level).
>>>
>>> Jody
>>>
>>> On 15/08/2009, at 10:00 PM, Arto Pastinen wrote:
>>>
>>>> Hi,
>>>>
>>>> I have created the crawl Visitor, which travel thru my style and
>>>> change the size of the label and pointsymbolizers,
>>>> but some reason the projection of the layers does not change, at
>>>> current scale, when i change the scale the
>>>> style is updated, but still at old scale, the style is the old..
>>>>
>>>> Any hints?
>>>>
>>>> regards, Artsi
>>>> _______________________________________________
>>>> User-friendly Desktop Internet GIS (uDig)
>>>> http://udig.refractions.net
>>>> http://lists.refractions.net/mailman/listinfo/udig-devel
>>>
>>> _______________________________________________
>>> User-friendly Desktop Internet GIS (uDig)
>>> http://udig.refractions.net
>>> http://lists.refractions.net/mailman/listinfo/udig-devel
>>>
>> _______________________________________________
>> User-friendly Desktop Internet GIS (uDig)
>> http://udig.refractions.net
>> http://lists.refractions.net/mailman/listinfo/udig-devel
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
>


Back to the top