[gdal-dev] Strange reset OGR_INTERLEAVED_READING when using Python bindings to read OSM PBF file
Even Rouault
even.rouault at mines-paris.org
Wed Apr 9 01:52:12 PDT 2014
Le mercredi 09 avril 2014 10:21:30, Dražen Odobašić a écrit :
> 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.
If you can't wait, just download a svntrunk package from
http://www.gdal.org/daily/ :-)
>
> 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
--
Geospatial professional services
http://even.rouault.free.fr/services.html
More information about the gdal-dev
mailing list