[gdal-dev] OGR Feature style API changes: StyleTable on datasources and layers

Frank Warmerdam warmerdam at pobox.com
Thu Mar 25 18:46:14 EDT 2010

brian wrote:
> I have two issues with the datasource and layer methods to get and set
> style tables.
> 1) The GetStyleTable(), SetStyleTableDirectly(), and SetStyletable()
> methods are not virtual therefore only the memory driver can use them.
> 2) The SetStyleTableDirectly() and SetStyletable() methods both return
> void. it is plausable that a datasource or layer could not support them.
> The API changes i am proposing are.
> 1) make the GetStyleTable(), SetStyleTableDirectly(), and
> SetStyletable() methods virtual.
> 2) make the SetStyleTableDirectly() and SetStyletable() methods return
> OGRErr.
> If a layer or datasource does not have a style table the GetStyleTable()
> method would already return NULL.
> I am also wondering if it makes any sence to add a couple of constants
> for the TestCapability() methods.


I am supportive of the suggested changes being done in trunk.  I would like
to see this written up as an RFC.  I'd like the RFC to go into a bit more
detail on what does and does not work now and what would and would not work
after the overhaul.  Also, to what extent if any this will alter the C ABI
for which we try to retain a high degree of backward compatability.

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

More information about the gdal-dev mailing list