Re: [gdal-dev] Use of C++ iterators in API

2018-04-10 Thread Mateusz Loskot
On 10 April 2018 at 23:06, Even Rouault wrote: > On mardi 10 avril 2018 22:34:56 CEST Mateusz Loskot wrote: >> On 10 April 2018 at 22:06, Even Rouault wrote: >> > >> > Just wanted to advertize the recent new introduction of C++ iterators >> > (...) >> >> Good one, thanks! >> >> > for( auto&&

Re: [gdal-dev] Use of C++ iterators in API

2018-04-10 Thread Even Rouault
On mardi 10 avril 2018 22:34:56 CEST Mateusz Loskot wrote: > On 10 April 2018 at 22:06, Even Rouault wrote: > > Hi, > > > > Just wanted to advertize the recent new introduction of C++ iterators > > (...) > > Good one, thanks! > > > for( auto&& poLayer: poDS->GetLayers() ) > > Do the iterat

Re: [gdal-dev] Use of C++ iterators in API

2018-04-10 Thread Mateusz Loskot
On 10 April 2018 at 22:06, Even Rouault wrote: > Hi, > > Just wanted to advertize the recent new introduction of C++ iterators (...) Good one, thanks! > for( auto&& poLayer: poDS->GetLayers() ) Do the iterators return a proxy reference hence the tutorial prefers auto&& over plain auto&? (ie

[gdal-dev] Use of C++ iterators in API

2018-04-10 Thread Even Rouault
Hi, Just wanted to advertize the recent new introduction of C++ iterators over GDALDataset (to iterate over its bands, layers and features), OGRLayer (to iterate overs its features), OGRFeature (to iterate over its field values) and OGRGeometry (if you iterate over a OGRGeometryCollection, you

Re: [gdal-dev] PEP8 compliance for Python code

2018-04-10 Thread Ben Elliston
On 10/04/18 19:05, Even Rouault wrote: > Apparently autopep8 can fix most of issues, except line too longs ? I think that's right. I would not plan to touch long lines. The worst of them can be fixed over time when other edits are taking place. > I guess your plans do not cover the SWIG generate

Re: [gdal-dev] PEP8 compliance for Python code

2018-04-10 Thread Even Rouault
Ben, Thanks for leading this. Apparently autopep8 can fix most of issues, except line too longs ? Do you plan to fix even that ? That could be quite painful now, and in the future, as in the testing code, you compare things like WKT strings that can be long, and that would be a burden to make su