[gdal-dev] OGR API with an OSM file

Etienne Trimaille etienne.trimaille at gmail.com
Mon Jun 17 08:55:19 PDT 2013


Hi,

I'm trying to use Python API with an OSM file.

According to the documentation of OSM driver, we can use a custom
OSM_CONFIG_FILE.
http://www.gdal.org/ogr/drv_osm.html

However, I can't find how to use my own config file with the API.

from osgeo import ogr

osmfile = 'test.osm'
driver = ogr.GetDriverByName('OSM')
datasource = driver.Open(osmfile)
layer = datasource.GetLayer()

Is there a way to use it ?

Thanks
Regards
Etienne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130617/ee7489a8/attachment.html>


More information about the gdal-dev mailing list