[mapserver-users] Bug or User error? MINSIZE not working

Stephen Woodbridge woodbri at swoodbridge.com
Sat Feb 5 18:07:04 PST 2011


Hi Thomas,

I'm using the AGG renderer which is really great by the way. Thank you 
for all the work you did on this and all the graphics drivers.

The data I'm dealing with is country sub-divisions, like provinces or 
regions in a country for all of the world. The problem is that in some 
small countries in that have lots of regions, the lines obliterate or 
fill the country at some zoom levels. The way I have resorted to deal 
with this is to compute the lengths of the cartographic boundary lines, 
and then FILTER ([LENGTH] >= nnnnn) where I adjust the value of nnnnn to 
a value that looks good on the map at the scale I'm working with.

This does require setting up multiple LAYERs if you need to set up 
different filters for different scales. Or you need to move FILTER into 
the CLASS when the class is scale dependent, which you can't do now.

This is probably best anyway for performance because the length is 
precomputed so the shape can be avoided totally based on the attribute.

Thanks,
   -Steve W

On 2/5/2011 4:03 PM, thomas bonfort wrote:
> Steve,
> compared to the use-case referred to in the bug, I think things have
> changed if you use the cairo or agg renderer as in those cases you
> don't end up with a pixel being fully highlighted as gd does.
> I wouldn't be against a configurable option to skip small geometries,
> but would label this as a performance enhancement rather than a
> quality one.
>
> regards,
> thomas
>
> On Fri, Feb 4, 2011 at 17:25, Stephen Woodbridge
> <woodbri at swoodbridge.com>  wrote:
>> On 2/4/2011 10:34 AM, Daniel Morissette wrote:
>>>
>>> On 11-02-04 10:13 AM, Stephen Woodbridge wrote:
>>>>
>>>> On 2/4/2011 2:14 AM, thomas bonfort wrote:
>>>>>
>>>>> what are you trying to obtain?
>>>>>
>>>> Ah, good question. I am trying to filter out objects the are very small
>>>> from rendering. At some zoom levels these objects are just to small to
>>>> be meaningful to render and end up looking like dirt on the image.
>>>>
>>>
>>> Ah, maybe what you're looking for is MINFEATURESIZE at the layer/class
>>> level?
>>>
>>> http://trac.osgeo.org/mapserver/ticket/1340
>>>
>>>
>>
>> Sigh - at least I'm consistent, needed this 6 years ago, and still need it!
>>
>> Looks like it might go in 6.0 if some can tackle it. It looks like we
>> already have code to do this as part of the labeling code, it just needs to
>> get added in the rendering chain.
>>
>> OK, back to the old way of doing this, add length attribute and filter on
>> length at different scales.
>>
>> -Steve
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>




More information about the MapServer-users mailing list