[gdal-dev] Reading OGRStyle information using C++

Aneesh Muralidharan symonando at gmail.com
Thu Jan 5 07:36:38 EST 2012


Chaithanya,

Ahhh that explains it ! Thanks a lot. By the way where do I find out these
information (like DXF driver doesn't support style table), as in where is
it documented ?

And can you suggest me some other vector format that OGR loads by default,
which has style information ? I was using SHP till now, but then it doesn't
have the style information at all right. Also it will be great if you can
point me to some place where I can find some free samples as well.

On Thu, Jan 5, 2012 at 5:51 PM, Chaitanya kumar CH
<chaitanya.ch at gmail.com>wrote:

> Aneesh,
>
> I don't know if the DXF format maintains a default style or a style table
> but OGR's DXF driver doesn't support layer's style table.
>
>
> On Thu, Jan 5, 2012 at 5:30 PM, Aneesh Muralidharan <symonando at gmail.com>wrote:
>
>> Hi Chaithanya,
>>
>> Thanks for the quick reply
>>
>> About the style table, I did try to use the layer style table, but I'm
>> getting an empty table :(
>>
>> By the way I'm trying to read a simple DXF file.
>>
>> On Thu, Jan 5, 2012 at 4:57 PM, Chaitanya kumar CH <
>> chaitanya.ch at gmail.com> wrote:
>>
>>> A layer's style table can be accessed using OGRLayer::GetStyleTable()
>>> [1].
>>>
>>> [1]: http://www.gdal.org/ogr/classOGRLayer.html
>>>
>>>
>>> On Thu, Jan 5, 2012 at 4:55 PM, Chaitanya kumar CH <
>>> chaitanya.ch at gmail.com> wrote:
>>>
>>>> Aneesh,
>>>>
>>>> A layer can have a style table that stores a set of styles that can be
>>>> referred by individual features. Usually the style table has a default
>>>> style.
>>>>
>>>> Its usage is explained in the same page as the OGR Feature Style
>>>> Specification.
>>>>
>>>> On Thu, Jan 5, 2012 at 3:45 PM, Aneesh Muralidharan <
>>>> symonando at gmail.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I'm new to OGR/GDAL and I'm trying to read style information of
>>>>> vectors using the OGR C++ API. I followed the documentation available here
>>>>> http://www.gdal.org/ogr/ogr_feature_style.html. I have managed to get
>>>>> the pen information of the glyphs' in vector file successfully.
>>>>>
>>>>> The problem is that, it is unclear that from where can I figure out
>>>>> the layer style specification. i.e the global style for the layer (
>>>>> assuming each glyph's pen can be either one of its own or dependent on the
>>>>> layer ). The OGRFeatureDefn for the OGRLayer doesn't seem to have this
>>>>> information.
>>>>>
>>>>> Also is there any detailed explanation of the API somewhere with some
>>>>> sample code snippets ? (for the feature-style api. For read/write I know
>>>>> there is http://www.gdal.org/ogr/ogr_apitut.html)
>>>>>
>>>>> Hoping for a quick response
>>>>>
>>>>> Thanks and regards,
>>>>> Aneesh Muralidharan
>>>>>
>>>>> _______________________________________________
>>>>> gdal-dev mailing list
>>>>> gdal-dev at lists.osgeo.org
>>>>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Best regards,
>>>> Chaitanya kumar CH.
>>>>
>>>> +91-9494447584
>>>> 17.2416N 80.1426E
>>>>
>>>
>>>
>>>
>>> --
>>> Best regards,
>>> Chaitanya kumar CH.
>>>
>>> +91-9494447584
>>> 17.2416N 80.1426E
>>>
>>
>>
>
>
> --
> Best regards,
> Chaitanya kumar CH.
>
> +91-9494447584
> 17.2416N 80.1426E
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120105/34d0151b/attachment.html


More information about the gdal-dev mailing list