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.

bozdoz
  • 345
  • 1
  • 3
  • 10

1 Answers1

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

ianbroad
  • 9,141
  • 4
  • 42
  • 88