[gdal-dev] libkml driver get document name

jan vaillant jvail at gmx.de
Tue Feb 23 05:50:35 PST 2016


Hi list,

I am reading a zipped kml with gdal's libkml driver. I am trying to access the name tag of the document:

<kml>
  <Document>
    <name>a_name</name>
...

If I look at the source code I can see a way to set those options here for writing kml

void OGRLIBKMLDataSource::SetCommonOptions(ContainerPtr poKmlContainer,
                                           char** papszOptions)
{
    const char* pszName = CSLFetchNameValue(papszOptions, "NAME");
    if( pszName != NULL )
        poKmlContainer->set_name(pszName);
...

but I cant find a way to read the options. ogrLayer->GetName() returns the file name not the <name>a_name</name> element. Any ideas?

Thank you
Jan


More information about the gdal-dev mailing list