[gdal-dev] OGR Feature Styles
Geo Aspects Development
dev at geoaspects.com
Thu Jan 24 07:39:44 EST 2008
hi,
I have a couple of questions regarding feature styles in OGR.
Firstly, it appears that there is no way to count or list the names of
styles stored in a StyleTable - the list is private and there are no
methods to access it. So, for example, in a UI, I can't list the
available styles by name for the user to choose from. Is this correct?
Secondly, the section in the documentation marked "Feature Styles can
be stored at 2 levels" suggests that a style can be defined at the
dataset or feature level. In fact, there is a StyleTable property for
OGRDataSource, for OGRLayer and for OGRFeature, however, none of the
drivers appear to use these tables (they simply store the style string
directly in the feature without using a table), plus the StyleMgr only
uses the one style table it has been initialized with (so you have to
preload it from the dataset, layer or feature) - which means that "all
that stuff should be transparent to the OGR client " is not exactly
the case ie If I want to look up a style name (as denoted by an @name
in the style string) I need to search the style tables stored in the
feature, then the layer and then the dataset myself?
Thanks
Tim
More information about the gdal-dev
mailing list