[MapServer-users] How to define/declare often used color definitions is a "centralized" file
Philippe Ghesquiere
philippe.ghesquiere at airbus.com
Thu Jun 5 08:11:15 PDT 2025
Hi Tanya,
A standard definition of symbol styling looks like :
STYLE
SYMBOL 'cross'
COLOR "#FF0000"
END
I would like to "centralized" my preferred color in order to declare
STYLE
SYMBOL 'cross'
COLOR "MyRedColor"
END
The discussion pointed out by Jukka (
https://www.mail-archive.com/mapserver-dev@lists.osgeo.org/msg00382.html.)
shows that the mechanism is not implemented.
Sincerely
Philippe
On Thu, Jun 5, 2025 at 4:50 PM TC Haddad <tchaddad at gmail.com> wrote:
>
> Hi Philippe,
>
> I'm not sure if I understood the question correctly, but as hinted in the
> post linked by Jukka, have you looked to see if you can achieve what you
> need by using INCLUDE files?
>
> see: https://mapserver.org/mapfile/include.html
>
> e.g. if you have a multiscale basemap that has 2 different renderings. The
> set of map files for each basemap would be identical in all respects,
> except for the color sets used. If you used INCLUDE files to store the
> colors, you could update colors in a large number of map files simply by
> editing the much smaller set of INCLUDE files. Is that what you were hoping
> for?
>
> Tanya
>
> On Wed, Jun 4, 2025 at 2:35 AM Philippe Ghesquiere via MapServer-users <
> mapserver-users at lists.osgeo.org> wrote:
>
>> Dear all
>>
>> I am using SYMBOLSET to define often used symbols in my Mapfiles.
>>
>> In our environment, we have a limited set of colors, which are used for
>> vector portrayal.
>> For example : Brown1245-21 is defined by #F2E9C4
>> I have been looking for a similar way as SYMBOLSET to define "variables"
>> for often used colors.
>>
>> I noticed that COLOR can be defined by either RGB or hexa strings.
>> It can also be defined as:
>> COLOR [MyAttribute]
>> where MyAttribute is an attribute of the processed vector objet.
>>
>> In our usecase, this last option does not work.
>>
>> Is there a way to declare a set of often used colors ?
>>
>> Thanks
>> Philippe
>> The information in this e-mail is confidential. The contents may not be
>> disclosed or used by anyone other than the addressee. Access to this e-mail
>> by anyone else is unauthorised.
>> If you are not the intended recipient, please notify Airbus immediately
>> and delete this e-mail.
>> Airbus cannot accept any responsibility for the accuracy or completeness
>> of this e-mail as it has been sent over public networks. If you have any
>> concerns over the content of this message or its Accuracy or Integrity,
>> please contact Airbus immediately.
>> All outgoing e-mails from Airbus are checked using regularly updated
>> virus scanning software but you should take whatever measures you deem to
>> be appropriate to ensure that this message and any attachments are virus
>> free._______________________________________________
>> MapServer-users mailing list
>> MapServer-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>
The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised.
If you are not the intended recipient, please notify Airbus immediately and delete this e-mail.
Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately.
All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20250605/3d03a323/attachment.htm>
More information about the MapServer-users
mailing list