[gdal-dev] VS2010-VS2013 s57
Dmitriy Baryshnikov
bishop.dev at gmail.com
Wed Dec 4 12:11:44 PST 2013
Hi,
I have such error: the GDAL compiled with VS2010-VS2013 in s57 driver
loose all additional fields values. But the same code compiled with gcc
or previous VS works fine.
I found the root of problems here (ogr\ogrsf_frmts\s57\s57reader.cpp:932):
const char *pszAcronym = poRegistrar->GetAttrAcronym(nAttrId);
iField = poFeature->GetDefnRef()->GetFieldIndex(pszAcronym);
The pszAcronym always empty.
The problem comes from this function (ogr\ogrsf_frmts\s57\s57.h:140):
const char *GetAttrAcronym( int i )
{ return GetAttrInfo(i) == NULL ? NULL :
aoAttrInfos[i]->osAcronym; }
It seems to me that during execution this function I have |situation
when||c_str()|result becomes invalid (the|std::string|is destroyed or a
non-const member function of the string is called).
If I change function
const char *GetAttrAcronym( int i )
{ return GetAttrInfo(i) == NULL ? NULL :
aoAttrInfos[i]->osAcronym.c_str(); }
the problem gone.
So I need some confirmation/verification my ideas.
If I'm right, I can make changes to s57 driver.
Best regards,
Dmitry
---
Это сообщение свободно от вирусов и вредоносного ПО благодаря защите от вирусов avast!
http://www.avast.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20131205/0244c5e7/attachment.html>
More information about the gdal-dev
mailing list