Re: [MapServer-users] setting COLOR of SVG symbol ?

2024-03-28 Thread karsten via MapServer-users
Thanks,
looks like it.
 
In QGIS setting color and opacity plus stroke does only work if the *.svg is
edited to allow by setting variables such as these below:
style="fill:param(fill) #00;fill-opacity:1;stroke:param(outline)
#00;stroke-width:param(stroke-width) 1;fill-opacity:param(fill-opacity)
1;stroke-opacity:param(outline-opacity) "
 
I guess a simple approach could be to allow setting colors for svgs in
MapServer if the svg has the style color set to
fill="currentColor" 
in order to be styled 

For now seems that MapServer vector symbols seem to be the way to go 
 
Cheers
Karsten 
  _  

From: Seth G [mailto:se...@geographika.co.uk] 
Sent: Thursday, March 28, 2024 00:06
To: karsten; MapServer Users
Subject: Re: [MapServer-users] setting COLOR of SVG symbol ?


Hi,


Unfortunately, I don't think this is currently possible, based on a previous
reply from Steve Lime [1]:


> I don't believe you can muck with the SVG color since SVG can carry
multiple elements and colors. That complexity doesn't map very well to a
single color value in a styleObj. It's probably best to consider SVG as
immutable, same as an image symbol. You can use truetype fonts (or vector
symbols) if you want something scaleable where you can alter color.

I guess if it works in QGIS then it should be possible to implement this in
the MapServer codebase too. 


Seth


[1] https://lists.osgeo.org/pipermail/mapserver-users/2019-June/081218.html


--

web:https://geographika.net & https://mapserverstudio.net

twitter: @geographika


On Wed, Mar 27, 2024, at 10:45 PM, karsten via MapServer-users wrote:


Hi All,


 
for the first time trying to use svg symbols for a layer. The svgs I am
using can be styled in QGIS (have edited to allow). 
What is the status in MapServer should setting  the color via a style work ?


I had no luck setting the COLOR on the symbol so far

Here is my style

 
 STYLE
   SYMBOL "electric_point"
   SIZE 20
   COLOR 255 0 0
 END # STYLE 

 
symbol


 
SYMBOL
NAME 'electric_point'
TYPE svg
image 'symbols/annotation/electric.svg'
END

 
So far this renders black symbols , any ideas how to fix this ?


 
Cheers

Karsten


 
Karsten Vennemann
  www.terragis.net

 
___

MapServer-users mailing list

MapServer-users@lists.osgeo.org

https://lists.osgeo.org/mailman/listinfo/mapserver-users




___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] 'application/json' is not a permitted output format for layer

2024-03-28 Thread Yves Jacolin via MapServer-users
I will test and will tell you. I was pretty sure to check such metadata
before :)

Thanks for your quick reply Mathias.

Y.

Le jeu. 28 mars 2024 à 09:40, mathias cunault  a
écrit :

> Hello,
> With your OUTPUTFORMAT configuration, if you want to use application/json
> in the URL of the WFS, verify that the wfs_getfeature_formatlist METADATA
> of your layer contains application/json.
> It is my configuration and it works fine. I hope it helps.
>
>
> Le jeu. 28 mars 2024 à 09:00, Yves Jacolin via MapServer-users <
> mapserver-users@lists.osgeo.org> a écrit :
>
>> Hello,
>>
>> I have a mapserver WFS service running for some time without any issue.
>> We upgraded to 7.6.5 and now a WFS request
>> with OUTPUTFORMAT=application/json; subtype=geojson; charset=utf-8 failed
>> with this message: msWFSGetFeature(): WFS server error. 'application/json'
>> is not a permitted output format for layer 'X', review
>> wfs_getfeature_formatlist setting.
>>
>> The mapfile looks like:
>>
>> OUTPUTFORMAT
>> NAME "geojson"
>> DRIVER "OGR/GEOJSON"
>> MIMETYPE "application/json; subtype=geojson; charset=utf-8"
>> FORMATOPTION "STORAGE=stream"
>> FORMATOPTION "FORM=SIMPLE"
>> EN
>>
>> If I use outputformat=geojson it works. Is it normal? Do you think that
>> Ican change the outputformat name to "application/json; subtype=geojson;
>> charset=utf-8"
>>
>> Thanks,
>>
>> Y.
>> --
>> [image: This is Yves Jacolin's card. Their email is
>> yves.jaco...@camptocamp.com. Their phone number is +33 6 18 75 42 21. Their
>> phone number is +33 4 58 48 20 43. Their phone number is +41 21 619 10 43.]
>> 
>> ___
>> MapServer-users mailing list
>> MapServer-users@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>

-- 
[image: This is Yves Jacolin's card. Their email is
yves.jaco...@camptocamp.com. Their phone number is +33 6 18 75 42 21. Their
phone number is +33 4 58 48 20 43. Their phone number is +41 21 619 10 43.]

___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] 'application/json' is not a permitted output format for layer

2024-03-28 Thread mathias cunault via MapServer-users
Hello,
With your OUTPUTFORMAT configuration, if you want to use application/json
in the URL of the WFS, verify that the wfs_getfeature_formatlist METADATA
of your layer contains application/json.
It is my configuration and it works fine. I hope it helps.


Le jeu. 28 mars 2024 à 09:00, Yves Jacolin via MapServer-users <
mapserver-users@lists.osgeo.org> a écrit :

> Hello,
>
> I have a mapserver WFS service running for some time without any issue. We
> upgraded to 7.6.5 and now a WFS request with OUTPUTFORMAT=application/json;
> subtype=geojson; charset=utf-8 failed with this message: msWFSGetFeature():
> WFS server error. 'application/json' is not a permitted output format for
> layer 'X', review wfs_getfeature_formatlist setting.
>
> The mapfile looks like:
>
> OUTPUTFORMAT
> NAME "geojson"
> DRIVER "OGR/GEOJSON"
> MIMETYPE "application/json; subtype=geojson; charset=utf-8"
> FORMATOPTION "STORAGE=stream"
> FORMATOPTION "FORM=SIMPLE"
> EN
>
> If I use outputformat=geojson it works. Is it normal? Do you think that
> Ican change the outputformat name to "application/json; subtype=geojson;
> charset=utf-8"
>
> Thanks,
>
> Y.
> --
> [image: This is Yves Jacolin's card. Their email is
> yves.jaco...@camptocamp.com. Their phone number is +33 6 18 75 42 21. Their
> phone number is +33 4 58 48 20 43. Their phone number is +41 21 619 10 43.]
> 
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


[MapServer-users] 'application/json' is not a permitted output format for layer

2024-03-28 Thread Yves Jacolin via MapServer-users
Hello,

I have a mapserver WFS service running for some time without any issue. We
upgraded to 7.6.5 and now a WFS request with OUTPUTFORMAT=application/json;
subtype=geojson; charset=utf-8 failed with this message: msWFSGetFeature():
WFS server error. 'application/json' is not a permitted output format for
layer 'X', review wfs_getfeature_formatlist setting.

The mapfile looks like:

OUTPUTFORMAT
NAME "geojson"
DRIVER "OGR/GEOJSON"
MIMETYPE "application/json; subtype=geojson; charset=utf-8"
FORMATOPTION "STORAGE=stream"
FORMATOPTION "FORM=SIMPLE"
EN

If I use outputformat=geojson it works. Is it normal? Do you think that
Ican change the outputformat name to "application/json; subtype=geojson;
charset=utf-8"

Thanks,

Y.
-- 
[image: This is Yves Jacolin's card. Their email is
yves.jaco...@camptocamp.com. Their phone number is +33 6 18 75 42 21. Their
phone number is +33 4 58 48 20 43. Their phone number is +41 21 619 10 43.]

___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] setting COLOR of SVG symbol ?

2024-03-28 Thread Seth G via MapServer-users
Hi,

Unfortunately, I don't think this is currently possible, based on a previous 
reply from Steve Lime [1]:

> I don't believe you can muck with the SVG color since SVG can carry multiple 
> elements and colors. That complexity doesn't map very well to a single color 
> value in a styleObj. It's probably best to consider SVG as immutable, same as 
> an image symbol. You can use truetype fonts (or vector symbols) if you want 
> something scaleable where you can alter color.

I guess if it works in QGIS then it should be possible to implement this in the 
MapServer codebase too. 

Seth

[1] https://lists.osgeo.org/pipermail/mapserver-users/2019-June/081218.html

--
web:https://geographika.net & https://mapserverstudio.net
twitter: @geographika

On Wed, Mar 27, 2024, at 10:45 PM, karsten via MapServer-users wrote:
> Hi All,
>  
> for the first time trying to use svg symbols for a layer. The svgs I am using 
> can be styled in QGIS (have edited to allow). 
> What is the status in MapServer should setting  the color via a style work ? 
> 
> I had no luck setting the COLOR on the symbol so far
> 
> Here is my style
>  
>  STYLE
>SYMBOL "electric_point"
>SIZE 20
>COLOR 255 0 0
>  END # STYLE 
>  
> symbol
>  
> SYMBOL
> NAME 'electric_point'
> TYPE svg
> image 'symbols/annotation/electric.svg'
> END
>  
> So far this renders black symbols , any ideas how to fix this ?
>  
> Cheers
> Karsten
>  
> Karsten Vennemann
> www.terragis.net
>  
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users