Created
November 20, 2012 03:29
-
-
Save elevine/4115762 to your computer and use it in GitHub Desktop.
ogr2ogr Python bindings example
This file contains hidden or 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 ogr2ogr | |
| import string | |
| import sys | |
| def main(): | |
| #note: main is expecting sys.argv, where the first argument is the script name | |
| #so, the argument indices in the array need to be offset by 1 | |
| ogr2ogr.main(["","-f", "KML", "out.kml", "data/san_andres_y_providencia_administrative.shp"]) | |
| if __name__ == '__main__': | |
| main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment