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
Post a Comment