[mapserver-users] Color palette for road-like layers

thomas bonfort thomas.bonfort at gmail.com
Wed Jan 7 03:08:01 EST 2009


there are also some planned features to simplify that syntax. (this is
how the mapfile to generate the map on the mapserver fron page is
written).

mapserver code:
http://svn.osgeo.org/mapserver/sandbox/graphics  (sticking with
revision 8254 unless you want to feel daring)

mapfile excerpt:
http://code.google.com/p/mapserver-utils/source/browse/trunk/highways.map#862

regards,
thomas

On Wed, Jan 7, 2009 at 08:47, Adrian Popa <adrian_gh.popa at romtelecom.ro> wrote:
> Thank you all for your help,
>
> I had the feeling this is how it's done, but I was hoping for a simpler
> approach.
>
> Anyway, now I must only find some decent colors for my layers :)
> Cheers,
> Adrian
>
> Paul Spencer wrote:
>>
>> Adrian,
>>
>> that is a fairly simple trick, you need to draw roads twice to do it.  You
>> can do that with two separate layers or two STYLE objects within a class
>> depending on what effect you want to achieve.
>>
>> In both cases, you just draw the road 2 pixels wider in your 'outline'
>> color (called a casement).  For instance, assuming you are using two STYLE
>> objects:
>>
>> LAYER
>>  NAME "Major Roads"
>>  TYPE LINE
>>  DATA myroads
>>  CLASS
>>    NAME "Major Roads"
>>    STYLE #Casement style
>>        SIZE 9
>>        COLOR 192 192 192
>>        SYMBOL "circle"
>>    END
>>    STYLE #Center style
>>        SIZE 7
>>        COLOR 255 255 255
>>        SYMBOL "circle"
>>    END
>>  END
>> END
>>
>> You would use two separate layers to draw the casement and center style if
>> you had several layers and/or classes of roads that you wanted to 'merge'
>> the casements - in your google screenshoot, you should notice that the grey
>> casement on Hollywood St merges with the casement on W 8th St and there is
>> no grey line between the two center colors, this would be how to achieve a
>> similar effect in MapServer.
>>
>> Cheers
>>
>> Paul
>>
>> On 6-Jan-09, at 3:51 AM, Adrian Popa wrote:
>>
>>> Yes Bob, I like the roads. :)
>>> Can you show me how you are able to draw contours around your roads?
>>>
>>> Thanks
>>>
>>>
>>> Bob Basques wrote:
>>>>
>>>> Adrian,
>>>>
>>>> Would the lines used for this map work for you?
>>>>
>>>> https://gis.ci.stpaul.mn.us/gis/gismo_public/html/
>>>>
>>>> Looks like the original Mapfile link is broken though, I'll need to fix
>>>> that in the morning.
>>>>
>>>> bobb
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Adrian Popa
>>>
>>> Network Engineer
>>> Romtelecom S.A.
>>> Divizia Centrul National de Operare Retea
>>> Departament Transport IP & Metro
>>> Compartiment IP Core
>>>
>>> _______________________________________________
>>> mapserver-users mailing list
>>> mapserver-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>>
>> __________________________________________
>>
>>   Paul Spencer
>>   Chief Technology Officer
>>   DM Solutions Group Inc
>>   http://research.dmsolutions.ca/
>>
>>
>
>
> --
> Adrian Popa
>
> Network Engineer
> Romtelecom S.A.
> Divizia Centrul National de Operare Retea
> Departament Transport IP & Metro
> Compartiment IP Core
>
>
> _______________________________________________
> 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