On 07.04.2014 22:44, Even Rouault wrote: > > Hi Dražen, > > I've just tested your pbf file and it showed a limitation of the driver > caused > by the huge PBF blocks produced by osmconvert, that I've fixed with > http://trac.osgeo.org/gdal/changeset/27138 . > But in my testing, the issue appeared also with ogr2ogr when not specifying > filters. Your script and ogr2ogr should behave similarly, all other things > (filters,etc.) remaining equal. > > About your script, to test if a field exists, you can use > lyr.GetLayerDefn().GetFieldIndex('admin_level') >= 0 > And for efficiency purpose do not put it in inner loop. > In fact, in your case you could just test that the lyr.GetName() == > "multipolygons" > > Even >
Tnx Even, I can't wait to try it out once new 1.11 beta gets tagged. Also, tnx for the tip, the script evolved in a way that inner loop executes a predicate function which will test is the feature something that's usable. Dražen _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
