7

I've just installed GDAL, but I don't know how to import/use ogr2ogr.

I've tried:

from osgeo import gdal
from osgeo import ogr

and searched both for ogr2ogr, but it wasn't there.

1
  • I think the link in the answer is a much more likely duplicate @Simbamangu
    – bozdoz
    Commented Mar 25, 2014 at 18:44

1 Answer 1

7

According to the answer posted by @elevine:

How do I use ogr2ogr to convert a GML to shapefile in Python

There is a ogr2ogr Python port which you can get here:

http://svn.osgeo.org/gdal/trunk/gdal/swig/python/samples/ogr2ogr.py

Not the answer you're looking for? Browse other questions tagged or ask your own question.