[Mapserver-dev] polygon outlines with classified layers

Jan Hartmann jhart at frw.uva.nl
Thu Nov 27 07:58:24 EST 2003


Bart van den Eijnden wrote:

>> Also is it possible, to only draw an outline when there is a 
>> border/transition between two classes? If I put on outline in all of 
>> my classes I have the problem that adjacent polygons which belong to 
>> the same class are drawn with an outline in between. In an ideal 
>> situation I would want only to have outline when there is a transition 
>> of classes.
>>

Daniel Morissette wrote:
> 
> Um... I can't think of a way to do that right now. You would almost need 
> to pre-merge your polygons.
> 
> Well... maybe there is something you could do, but that's really a hack 
> and may not work very well, you would need two layers:
> 
> 1- First draw all your polygons as a line layer with a thickness of 2-3 
> pixels.
> 
> 2- Then use a second layer to draw all your polygons again but with no 
> outline this time.  This will have the effect of erasing the common 
> borders and will erase only the 50% of the width of the outer borders.
> 
> Daniel

Alternatively, use PostGIS 0.8 with the new topological operators (UNION 
I think). You can write quite easily a DATA statement with a query 
combining al the polygons you want, and color and outline the resulting 
combined polygons. This is more elegant than Daniel's solution, but I am 
not sure if it is fast enough for heavy server load. IMO very much worth 
an experiment.

Jan




More information about the mapserver-dev mailing list