[mapserver-users] SVG OUTPUTFORMAT TEXT LABEL

Stephen Woodbridge stephenwoodbridge37 at gmail.com
Wed Feb 27 07:33:25 PST 2019


I'm guessing that this is a CAIRO issue because mapserver hands off the 
rendering to CAIRO and at a low level CAIRO is sending the vectors to 
the SVG file rather than rasterizing them. That said, I haven't looked 
at the code and I'll defer to any of the dev's.

-Steve W

On 2/27/2019 5:50 AM, Adrian Dahinden wrote:
>
> Hello mapserver users
>
> Does anyone have experience with the SVG OUTPUTFORMAT of MapServer 
> when rendering text labels?
>
> For a GetMap request with the format «FORMAT = image / svg + xml» the 
> mapserver returns on text labels the labels as <path ...> instead of 
> <text ...> svg elements.
>
> According to the documentation, this should not be the case with 
> TRUETYPE fonts: https://mapserver.org/output/svg.html#text-features
>
> I assume there the docs isn’t true yet, since it is over 10 years old. 
> Or is this simply not implemented in the CAIRO/SVG render engine?
>
> My MapFile configuration looks like this:
>
> MAP
>
>>
>   IMAGETYPE svg
>
>>
>   OUTPUTFORMAT
>
>     NAME svg
>
>     MIMETYPE "image/svg+xml"
>
>     DRIVER CAIRO/SVG
>
>     FORMATOPTION "COMPRESSED_OUTPUT=FALSE"
>
>     FORMATOPTION "FULL_RESOLUTION=TRUE"
>
>     IMAGEMODE RGB
>
>     EXTENSION "svg"
>
>   END
>
>>
>  WEB
>
>     IMAGEPATH 'geotmp/log/mapserver/'
>
>     IMAGEURL 'geotmp/log/mapserver/'
>
>   END
>
> ...
>
>   LAYER
>
>     NAME "Nr"
>
>     TYPE POINT
>
>     PROJECTION
>
>       "init=epsg:2056"
>
>     END
>
>     CONNECTIONTYPE postgis
>
>     PROCESSING "CLOSE_CONNECTION=DEFER"
>
>     CONNECTION "user=www-data password=www-data dbname=… host=…"
>
>     DATA  "pos from (SELECT … FROM …) AS foo using unique gid using 
> epsg:2056"
>
>     LABELITEM "nummer"
>
>     CLASS
>
>       LABEL
>
>         TYPE TRUETYPE
>
>         FONT arial
>
>         SIZE 5
>
>         COLOR 0 0 0
>
>       END
>
>     END
>
>   END
>
>>
> END
>
> We use MapServer version 7.0.4.
>
> Kind regards
>
> Adrian Dahinden
>
> ALPGIS AG
> Raumentwicklung und Geoinformation
> Fliederweg 11
> 3600 Thun
>
>
> Telefon 033 224 04 30 / direkt 033 224 04 34
> Fax 033 224 40 60
> www.alpgis.ch <http://www.alpgis.ch/>
> mailto:a.dahinden at alpgis.ch
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



More information about the mapserver-users mailing list