[gdal-dev] How use an SVG in the OGR Feature Styles

Even Rouault even.rouault at mines-paris.org
Thu Jul 17 12:13:05 PDT 2014


Le jeudi 17 juillet 2014 15:25:31, Andrea Peri a écrit :
> Hi,
> 
> I'm studyng the specs for
> OGR Feature Style.
> 
> available at http://www.gdal.org/ogr_feature_style.html
> 
> Our goal is to try to use it with mapserver just now and in the future on
> QGIS.
> 
> In that spec, in the BRUSH Tool parameters section
> and also in the Symbol tool section,
> 
> I read about the option to define any vector symbol and is cited as
> example the WMF or bitmap image.
> 
> I like to know if is usable instead of a WMF an SVG symbol definition.
> 
> And if yes , if there is any example of how to set an SVG file inside
> the Brush or Symbol Tool section.

Andrea,

I believe you could use any symbol id like "foo" in the OGR feature style 
string, and if you make sure that in your mapfile a matching "foo" symbol 
exists and points to a SVG file (see Note 3 in "Important notes" of 
http://mapserver.org/input/vector/ogr.html#styleitem-auto-rendering-layers-
using-style-information-from-the-ogr-file )

symbol 
  name "foo"
  type svg
  image "/path/to/some.svg"
end

OGR only passes a string to the using application (MapServer in that 
instance). It is up to the application to decide what to make with that 
string. 

Even

> 
> Thx,

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html


More information about the gdal-dev mailing list