Python implemented ogr2ogr command -


i convert .gml files shapefile format using ogr2ogr python. suggestions topic discussed within forum did not work me. here of code...

the folder search "c_sentinel_dir". within subdirectories of folders .gml's. resulting search-variable "f" contains these .gml's.

then define output path of shape file using "cloud_dir" path empty folder ending "/". following, add basename of file , add .shp extension.

to me seems correct when run code, syntax error cloud_shp line.... have clue, why? thanks

  dirpath, dirnames, files in os.walk(c_sentinel_dir)   f in fnmatch.filter(files, '*clouds*.gml')     cloud_shp = cloud_dir+os.path.basename(f)[:-3]+'shp'     ogr2ogr -f 'esri shapefile' cloud_shp f 


Comments

Popular posts from this blog

sql - can we replace full join with union of left and right join? why not? -

javascript - Parallax scrolling and fixed footer code causing width issues -

iOS: Performance of reloading UIImage(name:...) -