[mapserver-dev] Improving SLD generated by MS: need small help :)

thomas bonfort thomas.bonfort at gmail.com
Sat May 10 03:21:22 PDT 2014


there's a MS_VALID_COLOR (iirc or something similar) macro defined for that

--
thomas

On 10 May 2014 12:20, Yves Jacolin <yves.jacolin at camptocamp.com> wrote:
> of course it was too easy:
> if (psStyle->color.red != -1 && psStyle->color.green != -1 &&
> psStyle->color.blue != -1)
>
> I will update my PR :)
>
> Y.
>
>
> 2014-05-10 11:40 GMT+02:00 Yves Jacolin <yves.jacolin at camptocamp.com>:
>
>> Hello,
>>
>> I am testing MapServer generating SLD file. I then import them into
>> GeoServer and check the difference. I try to change the source code of
>> MapServer (add propertyName for label, support outline(width|color), support
>> some vendor parameter, better support for label with halo, support
>> expression list).
>>
>> At this moment I am improving my seconde PR thanks to Thomas comment [1]
>> but I am stuck with a small issue:
>>
>> I have this kind of mapfile:
>>         STYLE
>>             WIDTH 0.5
>>             OUTLINEWIDTH 2
>>             OUTLINECOLOR 0 0 0
>>             #COLOR "#aaaaaa"
>>         END
>>
>> The SLD generated for the WIDTH/COLOR part is:
>> <se:Stroke>
>>   <se:SvgParameter name="stroke">#</se:SvgParameter>
>>   <se:SvgParameter name="stroke-width">0.50</se:SvgParameter>
>> </se:Stroke>
>>
>> And my source code is:
>>
>> if ((psStyle->outlinewidth > 0 && &psStyle->outlinecolor) &&
>> (psStyle->width >= 0 && &psStyle->color))
>>
>> This test is not working properly as psStyle->color exists but doesn't
>> contains anything but '#' symbol.
>>
>> Any idea how to test if a color parameter has been defined in a mapfile?
>>
>> Thanks,
>>
>> Y.
>> [1] https://github.com/mapserver/mapserver/pull/4922
>> --
>> Responsable Formation et Support
>> Camptocamp France SAS
>> Savoie Technolac, BP 352
>> 73377 Le Bourget du Lac, Cedex
>>
>> Tel (France) : +33 4 79 26 57 98
>> Tel (Suisse) : 021 619 10 43
>> Mob. : +33 6 18 75 42 21
>> Fax : 04 79 70 15 81
>>
>> Mail : yves.jacolin at camptocamp.com
>> http://www.camptocamp.com
>
>
>
>
> --
> Responsable Formation et Support
> Camptocamp France SAS
> Savoie Technolac, BP 352
> 73377 Le Bourget du Lac, Cedex
>
> Tel (France) : +33 4 79 26 57 98
> Tel (Suisse) : 021 619 10 43
> Mob. : +33 6 18 75 42 21
> Fax : 04 79 70 15 81
>
> Mail : yves.jacolin at camptocamp.com
> http://www.camptocamp.com
>
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev


More information about the mapserver-dev mailing list