I know Esri shapefile can be converted into GeoJSON using Python and GDAL/OGR. Following command works on the terminal.
ogr2ogr -f GeoJSON -t_srs crs:84 outfile.geojson inputfile.shp
I want to do the conversion in a python script so that I can convert multiple files inside a loop. And combine it in my pipeline script.
Is there any way to do this conversion in python script? Can this terminal command be used in a python script?