[gdal-dev] GML / NAS code redundancy

Martin Landa landa.martin at gmail.com
Sat Apr 5 13:04:02 PDT 2014


Hi Even,

2014-04-05 13:17 GMT+02:00 Even Rouault <even.rouault at mines-paris.org>:
> gmlregistry.diff looks fine, but it would be good to document elementValue in
> drv_gml.html

I will prepare such patch tomorrow.

> All in all, I think that the more simpler solution would be to drop that patch
> and rather modify the call to SetFilteredClassName() at line 130 of
> ogrgmllayer.cpp to something like this :
>
> if (poDS->GetLayerCount() > 1 && poDS->GetReadMode() == STANDARD)
> {
>     const char* pszElementName = poFClass->GetElementName();
>     const char* pszLastPipe = strrchr(pszElementName, '|');
>     if( pszLastPipe != NULL )
>          pszElementName = pszLastPipe + 1;
>     poDS->GetReader()->SetFilteredClassName(pszElementName);
> }
>
> This is completely untested of course...

ah, this seems to be much more better solution! It seems to work, I
will do more tests later tomorrow.

Thanks a lot, Martin


More information about the gdal-dev mailing list