<div dir="ltr"><div>Thanks Thomas, even simplier now :)<br><br></div>Y.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-10 12:21 GMT+02:00 thomas bonfort <span dir="ltr"><<a href="mailto:thomas.bonfort@gmail.com" target="_blank">thomas.bonfort@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">there's a MS_VALID_COLOR (iirc or something similar) macro defined for that<br>
<br>
--<br>
thomas<br>
<div><div class="h5"><br>
On 10 May 2014 12:20, Yves Jacolin <<a href="mailto:yves.jacolin@camptocamp.com">yves.jacolin@camptocamp.com</a>> wrote:<br>
> of course it was too easy:<br>
> if (psStyle->color.red != -1 && psStyle->color.green != -1 &&<br>
> psStyle->color.blue != -1)<br>
><br>
> I will update my PR :)<br>
><br>
> Y.<br>
><br>
><br>
> 2014-05-10 11:40 GMT+02:00 Yves Jacolin <<a href="mailto:yves.jacolin@camptocamp.com">yves.jacolin@camptocamp.com</a>>:<br>
><br>
>> Hello,<br>
>><br>
>> I am testing MapServer generating SLD file. I then import them into<br>
>> GeoServer and check the difference. I try to change the source code of<br>
>> MapServer (add propertyName for label, support outline(width|color), support<br>
>> some vendor parameter, better support for label with halo, support<br>
>> expression list).<br>
>><br>
>> At this moment I am improving my seconde PR thanks to Thomas comment [1]<br>
>> but I am stuck with a small issue:<br>
>><br>
>> I have this kind of mapfile:<br>
>>         STYLE<br>
>>             WIDTH 0.5<br>
>>             OUTLINEWIDTH 2<br>
>>             OUTLINECOLOR 0 0 0<br>
>>             #COLOR "#aaaaaa"<br>
>>         END<br>
>><br>
>> The SLD generated for the WIDTH/COLOR part is:<br>
>> <se:Stroke><br>
>>   <se:SvgParameter name="stroke">#</se:SvgParameter><br>
>>   <se:SvgParameter name="stroke-width">0.50</se:SvgParameter><br>
>> </se:Stroke><br>
>><br>
>> And my source code is:<br>
>><br>
>> if ((psStyle->outlinewidth > 0 && &psStyle->outlinecolor) &&<br>
>> (psStyle->width >= 0 && &psStyle->color))<br>
>><br>
>> This test is not working properly as psStyle->color exists but doesn't<br>
>> contains anything but '#' symbol.<br>
>><br>
>> Any idea how to test if a color parameter has been defined in a mapfile?<br>
>><br>
>> Thanks,<br>
>><br>
>> Y.<br>
>> [1] <a href="https://github.com/mapserver/mapserver/pull/4922" target="_blank">https://github.com/mapserver/mapserver/pull/4922</a><br>
>> --<br>
>> Responsable Formation et Support<br>
>> Camptocamp France SAS<br>
>> Savoie Technolac, BP 352<br>
>> 73377 Le Bourget du Lac, Cedex<br>
>><br>
>> Tel (France) : <a href="tel:%2B33%204%2079%2026%2057%2098" value="+33479265798">+33 4 79 26 57 98</a><br>
>> Tel (Suisse) : <a href="tel:021%20619%2010%2043" value="+33216191043">021 619 10 43</a><br>
>> Mob. : <a href="tel:%2B33%206%2018%2075%2042%2021" value="+33618754221">+33 6 18 75 42 21</a><br>
>> Fax : <a href="tel:04%2079%2070%2015%2081" value="+33479701581">04 79 70 15 81</a><br>
>><br>
>> Mail : <a href="mailto:yves.jacolin@camptocamp.com">yves.jacolin@camptocamp.com</a><br>
>> <a href="http://www.camptocamp.com" target="_blank">http://www.camptocamp.com</a><br>
><br>
><br>
><br>
><br>
> --<br>
> Responsable Formation et Support<br>
> Camptocamp France SAS<br>
> Savoie Technolac, BP 352<br>
> 73377 Le Bourget du Lac, Cedex<br>
><br>
> Tel (France) : <a href="tel:%2B33%204%2079%2026%2057%2098" value="+33479265798">+33 4 79 26 57 98</a><br>
> Tel (Suisse) : <a href="tel:021%20619%2010%2043" value="+33216191043">021 619 10 43</a><br>
> Mob. : <a href="tel:%2B33%206%2018%2075%2042%2021" value="+33618754221">+33 6 18 75 42 21</a><br>
> Fax : <a href="tel:04%2079%2070%2015%2081" value="+33479701581">04 79 70 15 81</a><br>
><br>
> Mail : <a href="mailto:yves.jacolin@camptocamp.com">yves.jacolin@camptocamp.com</a><br>
> <a href="http://www.camptocamp.com" target="_blank">http://www.camptocamp.com</a><br>
><br>
</div></div>> _______________________________________________<br>
> mapserver-dev mailing list<br>
> <a href="mailto:mapserver-dev@lists.osgeo.org">mapserver-dev@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-dev</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Responsable Formation et Support<br>Camptocamp France SAS<br>Savoie Technolac, BP 352<br>73377 Le Bourget du Lac, Cedex<br><br>Tel (France) : +33 4 79 26 57 98<br>Tel (Suisse) : 021 619 10 43<br>
Mob. : +33 6 18 75 42 21<br>Fax : 04 79 70 15 81<br><br>Mail : <a href="mailto:yves.jacolin@camptocamp.com" target="_blank">yves.jacolin@camptocamp.com</a><br><a href="http://www.camptocamp.com" target="_blank">http://www.camptocamp.com</a>
</div>