[gdal-dev] Style Tool in C API
Nik Sands
nixanz at nixanz.com
Thu Jul 31 21:20:57 PDT 2014
Hi guys,
I found that there seems to be no explicit C API for the non-generic style tool classes such as 'OGRStylePen'. Now I've just found the documentation at https://trac.osgeo.org/gdal/wiki/rfc18_ogr_styles_c_api which states that this is deliberate and that they are unecessary, stating:
• NO wrappers will be needed for the following C++ classes which are handled internally by the OGR_ST_* wrappers above:
class OGRStylePen : public OGRStyleTool
class OGRStyleBrush : public OGRStyleTool
class OGRStyleSymbol : public OGRStyleTool
class OGRStyleLabel : public OGRStyleTool
So I'm wondering what is the correct way, in the C API, to do the equivalent of the 'Color' method on the C++ class 'OGRStylePen'? Eg, is there some way of matching up a parameter number in a 'OGRStyleToolH' with a parameter type (such as color)? Eg, are the different parameter types all guaranteed to be at a specific parameter number? Otherwise how do I know which parameter (by number) is which without fully parsing the style string myself? If this guess is correct, is there a documented index telling me which paramters have which parameter index numbers.
Or if I'm completely off the mark, can somebody please set me straight with the correct usage to get a color from a OGRStyleToolH in the C API?
Cheers,
Nik.
More information about the gdal-dev
mailing list