[FWTools] ogr2ogr python examples

Frank Warmerdam warmerdam at pobox.com
Thu Oct 19 14:08:26 EDT 2006

David Fawcett wrote:
> Can anyone point me to an example or two of using ogr2ogr in the ogr 
> python module?  I want to write something to batch convert .csv data 
> files to shapefiles. 
> This is for a less-technical user, so I may eventually want to wrap it 
> up with a few simple forms and py2exe.  (But I am getting way ahead of 
> myself...) 


I assume you mean doing something similar to ogr2ogr but using the python

I'd suggest looking at a few of the scripts in:


In particular tigerpoly.py, vect_tr.py, vec_tr_spat.py and perhaps
assemblepoly.py and get_soundg.py.

None are exactly what you want, but several do include creating shapefiles
from scratch which should be helpful.

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org

More information about the FWTools mailing list