Skip to content

Instantly share code, notes, and snippets.

@maphew
Created April 9, 2015 17:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maphew/d9ca85f5080221475788 to your computer and use it in GitHub Desktop.
Save maphew/d9ca85f5080221475788 to your computer and use it in GitHub Desktop.
import sys
from osgeo import ogr
def main(in_file, in_format, out_file, out_format):
in_ds = ogr.GetDriverByName(in_format).Open(in_file)
out_ds = ogr.GetDriverByName(out_format).CopyDataSource(in_ds, out_file)
if __name__ == '__main__':
main(*sys.argv[1:])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment