Created
April 9, 2015 17:12
-
-
Save maphew/d9ca85f5080221475788 to your computer and use it in GitHub Desktop.
from http://gis.stackexchange.com/questions/141905/force-ogr-to-use-specific-driver-for-input-format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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