[gdal-dev] OGR style fields

Tamas Szekeres szekerest at gmail.com
Sat Jan 19 15:48:49 EST 2008


2008/1/19, Frank Warmerdam <warmerdam at pobox.com>:
> I'd note that the OGR SQL parser does not understand how to use
> "AS" to rename a field.
>

Frank,

I'm quite aware of that, neither the field name alias not the
constants are supported in the select field list. I consider this as
an addition not as an existing feature.

>
> With the change (GetStyle() falls back to OGR_STYLE attribute) I think
> the only other OGR changes that might be needed are:
>
>   * Support for style strings in the KML driver (missing now completely
>     as far as I know *and* I'm not even sure that KML styling options
>     would be well represented by OGR Feature Style strings).
>

The transformation from the OGR style to the KML style is quite
ambiguous. However I think we could easily include the PolyStyle,
LineStyle and LabelStyle in the KML output.
We should also provide style transformation functions like
GetStyleAsKML that should be exposed to the SWIG interface as well.
However this might be a subject of a subsequent proposal.

>   * Some mechanism to manage feature styles - at least carrying them
>     through or reassigning to an attribute - in the VRT driver.
>

I think it would be enough to add the following line
poDstFeat->SetStyleString(poSrcFeat->GetStyleString());

to TranslateFeature in ogrvrtlayer.cpp if you don't object that.

Best regards,

Tamas


More information about the gdal-dev mailing list