[gdal-dev] Geospatial PDF with OGR_DATASOURCE

Even Rouault even.rouault at mines-paris.org
Tue Jun 5 15:21:13 PDT 2012


> I want to combine raster and vector sources but I found
> it impossible to discover how to use the -sql parameter
> together with the PDF creation option -co OGR_DATASOURCE=
> Fortunately it was enough to add an attribute named OGR_STYLE
> into the shapefile and fill in styles as strings.

Yes, you can't directly do that through the GDAL PDF driver, but you can for 
example use a OGR VRT as the datasource for the OGR_DATASOURCE creation 
option.

> 
> I could symbolize lines and polygons with PEN and BRUSH by
> using the examples from http://www.gdal.org/ogr/ogr_feature_style.html
> However, I could not make SYMBOL settings to work with my
> points. They appear as grey circles even if I attached some
> OGR_STYLE strings to them, like
>  SYMBOL(c:#00FF00,id:"ogr-sym-7")
> 
> I was able to set the colours of the points by using PEN but
> altering the w: parameter did not change the size of the
> points.

Yes, SYMBOL tool was not yet implemented up to now. There's now a limited 
implementation of it :

r24543 /trunk/ (3 files in 3 dirs): OGR PDF: use SYMBOL styling on point 
geometries, limited to taking into account the id (ogr-sym-0 to ogr-sym-9), c 
and s parameters

Note that the PEN, BRUSH and LABEL tool are also limited in the support of 
their parameters :
  * color, width and dash pattern for PEN
  * color for BRUSH
  * text, color, size and angle for TEXT (the text being limited to ASCII 
characters)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120606/b13dc937/attachment.html>


More information about the gdal-dev mailing list