Created
July 8, 2011 03:08
-
-
Save drnextgis/1071042 to your computer and use it in GitHub Desktop.
gpxconv
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os,fnmatch | |
def main(): | |
rootPath = 'c:/personal/gpx' | |
for root, dirs, files in os.walk(rootPath): | |
gpxfiles = fnmatch.filter(files, '*.gpx') | |
if (len(gpxfiles) != 0): | |
for filename in gpxfiles: | |
os.system('ogr2ogr '+os.path.join(root,filename)+'.shp '+os.path.join(root,filename)+' tracks') | |
return 0 | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment