How do I access a shapefile using gdal?
How do I access a shapefile using gdal? Question: I am trying to use the following code to access a shapefile: import os from osgeo import gdal from osgeo import ogr from osgeo import osr shp_path = "xxxxxxxx" if __name__==’__main__’: ogr.RegisterAll() gdal.SetConfigOption("SHAPE_ENCODING", "UTF-8") gdal.SetConfigOption("GDAL_FILENAME_IS_UTF8", "YES") oDriver = ogr.GetDriverByName("ESRI Shapefile") path_list= os.listdir(shp_path) for dir in path_list: …