[gdal-dev] What's so wrong with this nc file ...
Jan Heckman
jan.heckman at gmail.com
Sat Oct 30 04:52:44 PDT 2021
Hi list,
I am working with the LVBAG driver, for which I am truly grateful, by the
way, in C++.
I have a problem with OFTStringList and the corresponding
function GetAsStringList() and/or the cast operator(s) to
std::vector<std::string>
In my code they produce an empty result.
switch (oField.GetType())
{
...
break;
case OFTStringList:
{
const std::string asString{ oField.GetAsString() };
cout << "Field type: " << oField.GetType() << ", string representation of
StringList: " << asString << endl;
const std::vector<std::string> asList{ oField };
cout << "Vector length string list: " << asList.size() << endl;
}
break;
...
}
produces
(single item list)
Field type: 5, string representation of StringList:
(1:NL.IMBAG.Pand.0518100000310601)
Vector length string list: 0
(2 item list)
Field type: 5, string representation of StringList:
(2:woonfunctie,kantoorfunctie)
Vector length string list: 0
and similar when I use oField.GetAsStringList() or any other variant using
reference etc.
The library I use is gdal-303-1928-x64-core.msi obtained from gisinternals
supportsite.
I can parse the stringlist type, the strings will in this case not contain
comma's, but I appreciate a pointer
to achieving this without additional bother.
Thanks in advance,
Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20211030/c86cd335/attachment.html>
More information about the gdal-dev
mailing list