[gdal-dev] about reading OGR feature style file *.ofs
wow
27949218 at qq.com
Fri Jul 4 05:18:34 EDT 2008
Hi,
I have created a style file border.ofs for a polygon shape file border.shp. Here's the ofs file content:
OFS-Version: 1.0
StyleField: ""
DefaultStyle: PEN(C:#000000)
road: PEN(c:#FF0000,w:5px)
lake: BRUSH(fc:#0000FF);LINE(c:#000000)
billboard: SYMBOL(c:#00FF00,id:"ogr-sym-9")
label: LABEL(f:"Times New Roman",s:12pt,t:{"China"})
When i try to get the style, i have the following two questions:
1. Did ogr provide mathod to get style from *.ofs file, or we shall read it line by line by users and then convert the style strings to Style Table to be accessed by OGRStyle referenced classes ?
If it did, when call shape driver to read shp file, dose the driver automatically read the style into OGRLayer? if so, then how can i get style with OGRLayer?
2. Is OGRLayer::GetStyleTable only available for getting style table from *.tlb file? I try to use it to read the above file border.ofs with these codes:
OGRStyleTable* pStyleTable;
pStyleTable = pLayer->GetStyleTable();
but failed.
Please help me. By the way, if someone has examples about styles, would you mail me some?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20080704/685e8fc3/attachment.html
More information about the gdal-dev
mailing list