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.
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.
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