[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 2 12:03:45 PDT 2014


Le mercredi 02 avril 2014 20:56:10, Sean Gillies a écrit :
> On 4/2/14, 12:29 PM, Even Rouault wrote:
> > Le mardi 01 avril 2014 19:26:09, Dražen Odobašić a écrit :
> >> Hi all,
> >> 
> >> I've been successfully reading OSM PBF files using GDAL Python bindings,
> >> even files larger than 5Gb. I did have to use
> >> OGR_INTERLEAVED_READING=YES and OSM_USE_CUSTOM_INDEXING=NO, but
> >> eventually OSM PBF is read and I can extract data.
> > 
> > Generally, you shouldn't have to mess with OSM_USE_CUSTOM_INDEXING.
> > 
> > As far as OGR_INTERLEAVED_READING=YES is concerned, it is not sufficient
> > to define the environmenent variable. I invite you to read again
> > "Interleaved reading" in http://gdal.org/ogr/drv_osm.html. The sample
> > C++ code (ported to Python) must be used *exactly*.  I really mean it.
> > That's what ogr2ogr does with OSM data.
> 
> Even,
> 
> Related question: are there cases where local configuration options are
> not sufficient and environment variables must be used instead? Can we
> (should we?) always rely on the configuration options set in a program?

I'm not sure to understand your question. You can either set an environmenet  
variable with the OS mechanisms, or use the GDAL SetConfigOption() API. Both 
will have same effect on GDAL behaviour.

Even


-- 
Geospatial professional services
http://even.rouault.free.fr/services.html


More information about the gdal-dev mailing list