[gdal-dev] Label from OGR Style in a VRT output over a tiff in a geospatial PDF

Christy Nieman cnieman at dmsolutions.ca
Mon Jul 9 11:03:50 PDT 2012


I'm trying to overlay vectors in a PDF with a geoTIFF as the backdrop 
with GDAL compiled from trunk last Friday.  I had no problem adding a 
point layer and a polygon layer to a VRT and giving them 
colours/symbols/outlines.  But I tried adding labels to the point layer 
by specifying the field containing the label text, and all that gets 
displayed for text is {NAME}.  VRT definition:


<OGRVRTLayer name="countries">

<SrcSQL>SELECT *,'BRUSH(fc:#367C23);PEN(c:#B7B7B7,w:1px)' AS OGR_STYLE 
FROM ne_10m_admin_0_countries</SrcSQL>

<OGRVRTLayer name="cities">

*,'SYMBOL(c:#0000FF,id:ogr-sym-9;s:9px);LABEL(s:40pt,t:{NAME})' AS 
OGR_STYLE FROM ne_110m_populated_places_simple</SrcSQL>


 From what I understand, LABEL(s:40pt,t:{NAME}) should use the NAME 
attribute field for the labels, but it is using "{NAME}" as the text.

Could someone point me in the right direction?


More information about the gdal-dev mailing list